Could you please provide any suggestions on this?

The method Site.forgotPassword(username) (of system defined class - Site) not resetting the password and not triggering email to user but verified that return value is true.

For reference method below invoked from a page.

Public PageReference forgotPassword() {

    boolean success = Site.forgotPassword(username);
    PageReference pageConfirm = Page.ForgotPasswordConfirm;
}  ////

Seems that you are using a sandbox. The password forgot email is a system mail. But system emails are disabled by default:

The System email only setting is especially useful for controlling email sent from sandboxes so that testing and development work doesn’t send test emails to your users.

  • Newly created sandboxes default to System email only.

You should change the Deliverability Settings to "All email".

| improve this answer | |
  • Christian thanks for your response. Yes, I had verified that already since it is set to "all emails" only. Further I could see there is a similar feature in our sandbox handled through managed apex class that resets password and sent email to a sandbox user. But we could not achieve the one using site methods. – vedakri Mar 4 '15 at 17:19
  • any suggestion pls to resolve this issue! – vedakri Mar 14 '15 at 6:27

I also faced the same issue that I was not getting password reset emails, even when Site.forgotPassword() method was returning true and here is what I was doing wrong.

1) When I was opening the Forgot password VF page for previewing in Salesforce org then it was not sending the email to reset the password.

2) When I opened the same VF page in the Force.com Site / Community / Customer Portal and then reset the password then it sent me a reset password email.

May be Salesforce does not send the reset password email when you are previewing the VF page in Salesforce but when you will open the VF page in Force.com Site / Community / Customer Portal and then reset the password then it will send you a reset email if everything is fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.