Email Form - Adding a name to the "From" email
3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 18, 2017 (RSS)
By depdesign - September 14, 2017 - edited: September 14, 2017
I am using the below snippet in code for sending automated emails. Is there a way I can modify the 'from' area to also include a name? For example when a user receives an email with the below code the 'from' is admin@website.com. I would like to give the email a name so that the 'from' would appear as "Website Admin <admin@website.com>". Is that possible?
$mailErrors = sendMessage(array(
'to' => $_REQUEST['email'],
'from' => 'admin@website.com',
'subject' => $_REQUEST['reply_subject'],
'html' => $message,
));
Any help would be greatly appreciated.
Dan
Just figured out how to do incase anyone else would like to do here is the code:
$mailErrors = sendMessage(array(
'to' => $_REQUEST['email'],
'from' => 'Website Admin <admin@website.com>',
'subject' => $_REQUEST['reply_subject'],
'html' => $message,
));
By Dave - September 18, 2017
Thanks for posting the solution!
interactivetools.com