Good day,
i tried this but default email was sent. any way to make this work?
function Email_Sending($email, $args) {
$recipients = array($args["rsnew"]["email"], "fox@gmail.com");
if ($this->action->CurrentValue == "For Action") {
$email->Subject = "URGENT:FOR ACTION WITH TRACKING NO. " . $this->doc_id->CurrentValue;
$emailContent .= "<br><br> Relative to this, may we request that you look into the matter and provide the necessary action(s) mindful of the Twelve (12) hours given to respond.";
} elseif ($this->action->CurrentValue == "For Resolution") {
$email->Subject = "TRANSACTION FOR RESOLUTION WITH TRACKING NO. " . $this->doc_id->CurrentValue;
$emailContent .= "<br><br> Kindly ensure that the client has been provided with feedback regarding the resolution of their concern before marking the grievance case as resolved.";
} elseif ($this->action->CurrentValue == "For Amendment") {
$email->Subject = "FOWARDED TRANSACTION NEEDS AMENDMENT WITH TRACKING NO. " . $this->doc_id->CurrentValue;
$emailContent .= "<br><br> Please ensure that you have addressed the request as indicated in the remarks column before forwarding the grievance case to the appropriate staff for further action.";
}
// Common closing for all scenarios
$emailContent .= "<br><br><br> Best Regards,";
$emailContent .= "<br> ADMIN";
$email->Recipient = implode(", ", $recipients);
$email->Content = $emailContent;
// Assuming email sending is successful
return true;
}