is anyone using a public site and sending an email with this public sites user through an apex class with the SingleEmailMessage Method. It always worked very well but since some time i get the error message:

"NO_MASS_MAIL_PERMISSION, Single email is not enabled for your organization or profile. Single email must be enabled for you to use this feature.: []"

Did salesforce some changes to the public sites user permissions. My current permissions allow outbound messages in the public access profile.

I cannot find any other permissions, and I am using exactly the same functions for other processes with internal users, there I it works fine problem.


Since the first part of your error message is "NO_MASS_MAIL_PERMISSION", I strongly suspect that your apex messaging class, which you've not posted the code for, may include a method from the MassEmailMessage Class; some of which are almost identical to SingleEmailMessage Methods with the exception that they have an "s" added to the end of them. Two examples in particular that come to mind would be:

setTargetObjectIds(ID[]) and setWhatIds(ID[])  <-- MassEmailMessage Methods


setTargetObjectId(ID) and setWhatId(ID) <-- SingleEmailMessage Methods

I recommend you review the apex messaging class you're using with your Sites to see if you have any MassEmailMessage methods included in your class which could be the cause of the error message you're receiving.

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.