Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Lost Password form not sending password reset email


Go to End


6 Posts   5022 Views

Avatar
Ben_W

Community Member, 80 Posts

25 November 2009 at 5:47pm

On my dev server, after I fill in my email address in the 'Lost Password' form, SilverStripe will send a email containing the password reset link to the email address I just filled in. The 'From' address of this email is the default server admin email address. However on my staging server, this password reset email does not get sent, I am guessing it is because I did not set a server admin email address(?). Is there a way to set the server admin email address in the _config.php, or the ability to change this default email address.

I had a look at Member.php, its Member_ForgotPasswordEmail class has the following comments for '$from' address, //setting a blank from address uses the site's default administrator email. Is there a way to set a email address for this?

Thank you for taking the time to read this!

Avatar
Ben_W

Community Member, 80 Posts

25 November 2009 at 7:05pm

I have put the following line in the _config.php, the password reset email worked on staging site.

Email::setAdminEmail('admin@yourdomain.com');

Avatar
Hamish

Community Member, 712 Posts

26 November 2009 at 12:51pm

This is probably because of your SMTP handler configuration, rather than anything in SilverStripe.

Avatar
DsX

Community Member, 178 Posts

14 March 2010 at 9:07am

I am just launching my first SS site, and have found that the system isn't sending email (notably the lost password message).
Can you point me toward information on any settings that I need to add to config (or anywhere else) to get this working?

this and trying to force the login to be under https are my only remaining issues.

Everything else in my site is working beautifully ;) I am really looking forward to the new version and getting into my next (much larger) site.

Avatar
DsX

Community Member, 178 Posts

30 April 2010 at 4:46am

The email setting above fixed my problem. Thanks.

Avatar
spierala

Community Member, 80 Posts

11 May 2012 at 4:02am

Hello,
same problem here:

putting this in config did not work:
Email::setAdminEmail('admin@mydomain.de');

How can I debug that?

Kind regards,
Florian