How to send email while checking condition in Row_Rendered()?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
bern_a3168
User
Posts: 53

How to send email while checking condition in Row_Rendered()?

Post by bern_a3168 »

Hello,
In the Row_Rendered(), I have conditions to check a value for each row and want to send an email if it meets the condition. Can guide me how to do that ? or I should do this in the Email_Sending() ?

Sample condition:

  	$today = date("Y-m-d");
	$tday = strtotime(date("Y-m-d"));
	$date_diff=0;
	$item_email = $this->e_mail->CurrentValue;
	$current_end_date = strtotime($this->end_date->CurrentValue);
        $date_diff = ($current_end_date - $tday)/60/60/24;

       if (CurrentPageID() == "list")
			{
				If ($date_diff == 7)
					{
						send email;
					}
               			 If ($date_diff < 7 or $date_diff > 7)
					{
                        			send email ;
					}
            		}

Thanks


mobhar
User
Posts: 11727

Post by mobhar »

There's a global function named SendEmail in the generated src/phpfn.php file that you can use to send email that suits your needs.


Post Reply