- Mon Sep 22, 2014 3:04 am
#780340
Dear all,
I would like to know how the calculation work based on the differences of two date.
- Due date and current date.
- different (current date - due date)
- if different >3 then send mail 1
else mail 2
i want to create this in trigger.
the below is my code
I would like to know how the calculation work based on the differences of two date.
- Due date and current date.
- different (current date - due date)
- if different >3 then send mail 1
else mail 2
i want to create this in trigger.
the below is my code
Code: Select all
Kindly help me. Thanks
$from = 'info@processmaker.com';
$to = @@Email;
$cc = 'abc@gmail.com';
$subject = 'Warning';
$subject1 = 'Reminder';
$template = 'latemail.html';
$template1 = 'remindmessage.html';
$str = strtotime(date("Y-m-d")) - (strtotime(@@followupdate));
$diff = floor($str/3600/24);
if($diff>=3)
PMFSendMessage(@@APPLICATION, $from, $to, $cc, '', $subject, $template);
else
PMFSendMessage(@@APPLICATION, $from, $to, '', '', $subject1, $template1);