How to send email while checking condition in Row_Rendered()?
Posted: Wed Mar 20, 2024 1:02 am
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