Default Email From Address

Permalink
Hi, having some trouble getting a change to the default email from address to take. I've added the below to config/site.php:

define('EMAIL_DEFAULT_FROM_ADDRESS', 'XXXXXXXXXXXXXXX');
define('EMAIL_DEFAULT_FROM_NAME', 'XXXXXXXXXXXX');
define('FORM_BLOCK_SENDER_EMAIL', EMAIL_DEFAULT_FROM_ADDRESS);

With Xs swapped out for real data. However, when submitting a forgotten password request the email is still coming from the site admin email address.

If I add the below line into public_html/concrete/mail/forgot_password.php

$from = array(EMAIL_DEFAULT_FROM_ADDRESS, EMAIL_DEFAULT_FROM_NAME);

Then it works fine.

I notice public_html/concrete/core/helpers/mail.php has this code in it:

if (!isset($from)) {
$from = array(EMAIL_DEFAULT_FROM_ADDRESS, EMAIL_DEFAULT_FROM_NAME);
$fromStr = EMAIL_DEFAULT_FROM_ADDRESS;
}

which I would have expected to pick up my values set in site.php without having to enter the $from line in forgot_password.php

Any ideas why the values in site.php aren't being picked up?

C5 version is 5.6.0.2

Cheers, James

 
jevans replied on at Permalink Reply
Anyone any thoughts?
keeasti replied on at Permalink Reply
keeasti
Try adding this line to site.php as well:

define('EMAIL_ADDRESS_FORGOT_PASSWORD', 'xxx@xxxxx.com'); //from email address for forgot password emails
jevans replied on at Permalink Reply
Thanks that seems to have worked! Is there a list of similar parameters for all the other system generated emails?
keeasti replied on at Permalink Reply
keeasti
I think I remember seeing a list somewhere once ... best hunt around for it.
Wanna mark my earlier reply as best answer?
keeasti replied on at Permalink Reply
keeasti