[Vtigercrm-developers] Workflow for sending mail in the future

IT-Solutions4You info at its4you.sk
Fri Apr 8 10:51:37 GMT 2016


You can set to execute task in future:
https://wiki.vtiger.com/vtiger6/index.php/Send_Email

Matus
ITS4You

Dňa 8. 4. 2016 o 8:30 Estefan Civera napísal(a):
> Hi All,
>
> I need to develop a system that allows me to send programmatly email after
> planning them.
>
> Here's an example
> today I create an event in which I plan to send an email from 5 days at
> 18:30
> I would that automatically 5 days at 18:30 through a workflow seemed this
> email.
>
> So I created a workflow that runs hourly and that checks if the start
> datetime of event is between (NOW()-$value HOURS and NOW())
>
> To do this  I've used "less than hours before" function that runs like this
> code below
>
> $rawFieldValue = date time of events....
> $value = 1 // hours to go in the past
>
> case 'less than hours before':
> if(empty($rawFieldValue) || empty($value)) {
> 	return false;
> }
> $currentTime = date('Y-m-d H:i:s');
> $olderDateTime = date('Y-m-d H:i:s', strtotime('-'.$value.' hours'));
> if($olderDateTime <= $rawFieldValue && $rawFieldValue <= $currentTime) {
> 	return true;
> }
> return false;
>
> I don't know this workflow never fires and the other works correctly.
>
> Thank EC
>
>
>
> -----
> Ing. Estefan Civera
> Vtiger developer and consultant
> http://www.estefancivera.net
> Italy
> --
> View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Workflow-for-sending-mail-in-the-future-tp18763.html
> Sent from the vtigercrm-developers mailing list archive at Nabble.com.
> _______________________________________________
> http://www.vtiger.com/
>




More information about the vtigercrm-developers mailing list