Change Mail sender / From mail header

Submitted by remo - 7 years ago

Whether you work with the mail helper in your own application or just use the form block to send a simple e-mail, you'll probably want to change the "from" field on those messages. You can do that, by setting a constant in config/site.php. If you don't specify anything, the mail address of the admin user will be used!

// If you want to override the sender used in the mail helper, put this line in
// your config/site.php:

define('EMAIL_DEFAULT_FROM_ADDRESS', '[email protected]');

// You can also change the name of the mail address
define('EMAIL_DEFAULT_FROM_NAME', 'Website Sender');

// If you just want to override the sender mail address for messages sent by the
// form block, put the following line in your config/site.php:

define('FORM_BLOCK_SENDER_EMAIL', '[email protected]');
comments powered by Disqus