Hi,
I am using the following code to send email.
But it is sending email even when I do not change/update the condition fields such Status, Prio and Anonym.
I do not want to receive email when I change another field than the condition fields.
It should check the condition for email if one of this condition field has been updated.
How to reach this?
if ((CurrentPageID() == "edit") AND (($args["rsnew"]["Status"] == 9) OR (($args["rsnew"]["Prio"] == "Eilig") AND ($args["rsnew"]["Anonym"] == 1 )))) { // If Add page
//$email->Recipient = $args["rsnew"]["MyEmailField"]; // Change recipient to a field value in the new record
$email->Recipient = $this->Bearbeiter->CurrentValue;
$email->Subject = "4In Sachen " .$args["rsnew"]["GNr"]; // Change subject
$email->Content = "<p>Fall mit GNr: ".$args["rsnew"]["GNr"]. " zwischen den Parteien " .$args["rsnew"]["Parteien"]. " wurde aktualisiert</p>"; // Append additional content
$email->Content .= "<p>VS: ".$args["rsnew"]["Vs"]. " Gs: " .$args["rsnew"]["Gs"]."</p>"; // Append additional content
}
mpol_ch