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.

Form Questions

Lost Password form not sending password reset email


Reply

6 Posts   3471 Views

Avatar
Ben_W

25 November 2009 at 5:47pm Community Member, 80 Posts

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

25 November 2009 at 7:05pm Community Member, 80 Posts

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

26 November 2009 at 12:51pm Community Member, 712 Posts

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

Avatar
DsX

14 March 2010 at 9:07am Community Member, 178 Posts

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

30 April 2010 at 4:46am Community Member, 178 Posts

The email setting above fixed my problem. Thanks.

Avatar
spierala

11 May 2012 at 4:02am Community Member, 80 Posts

Hello,
same problem here:

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

How can I debug that?

Kind regards,
Florian