function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Maurya PriyadarshiMaurya Priyadarshi 

​Customer Portal Password reset Email not sent through Force.com site forgot password page.

I have a force.com site for my org's Customer portal access. The login page works fine but when customers try to reset their password using the force.com forgot password page (company.force.com/ForgotPassword) they do not receive any email. However if I use the standard Forgot Password page ()https://na3.salesforce.com/secur/login_portal.jsp?orgId=XXXXXXXXXX&portalId=XXXXXXXXXXX) it works.

This was working before for my org and stopped working all of a sudden. Any help regarding this would be greatly appreciated. Thanks.

 
ShashankShashank (Salesforce Developers) 
Hi Maurya,

I have checked your org internally with the login access you provided in the salesforce support case that you initially raised. Here are my findings:

Your "ForgotPassword" visualforce page uses the Site.ForgotPassword() method to implement the password reset functionality. This happens in the user context of the "Site Guest User", who does not have access to the Contact and Acccount record of the user that you are trying to reset the password for.

In this scenario, when the email template that you are using, for the  email to be sent, contains merge fields from the related Contact or Account, the email will not be sent. This is expected behavior and is confirmed by R&D in one of their investigations.

A point of note is that this is related to portals -- communities has long since replaced portals. As such, it is not likely that any enhancements be applied for portals. As a workaround, please try removing merge fields and use a simple email template instead.

Thanks,
Shashank
Joseph BundaJoseph Bunda
I am also having this problem. I've removed all merge fields from the email template being used, and have double-checked that all emails are sent via delivery settings. The password resets, but no email will deliver. This appears to be a bug in Salesforce.