Hello,
I am trying to setup my first send email on add.
So I have put in the names of my fields. I have the email setup complete. I have clicked the checkbox for Email Notification "Add".
I have added the code below to the table-Specific -> Common -> Email_Sending event.
function Email_Sending(&$Email, &$Args) {
//var_dump($Email);
//var_dump($Args);
//exit();
if (CurrentPageID() == "add") { // If Add page
$Email->Recipient = $Args["rsnew"]["user_email"]; // Change recipient to a field value in the new record
$Email->Subject = "Your Helpdesk Ticket has been Submitted"; // Change subject
$Email->Content .= "\nAdded by " . CurrentUserName(); // Append additional content
}
return TRUE;
}
I am receiving the following error:
The following From address failed: : Called MAIL FROM without being connected
My goal is to send an email from the current user logged in (CurrentUserName()) to the person who filled out the form (user_email).
Any ideas? Many thanks in advance.