NO_MASS_MAIL_PERMISSION in Salesforce unit tests

Hi,

I have a unit test in Salesforce that test some send email functionality. After my sandbox has been refreshed from production, I started to get the following exception on the email functionality:
NO_MASS_MAIL_PERMISSION 

I have made sure that the Mass Email option is checked on the user's profile, so I wonder what might be the reason for this behaviour.
graham on 23-05-2013 10:44
The reason turned out to be another setting in setup. If you go to Setup | Email Administration | Deliverability, you need to make sure that the Access to Send Email level is set to All email. In my case the option was set to System email only, that's why the send failed.
graham on 23-05-2013 10:46

Post an answer

Do you have a solution to this problem, or want to comment on it? Other users will appreciate your help!
Your answer or comment:
Show formatting hints
HTML is disallowed, but in your text you can use the following markup
  • [code][/code] for a block of code
  • [tt][/tt] for inline code
  • [link]link href|link anchor[/link] for links
  • [b][/b] for bold text
+ Ask a question
If you have a technical question related to programming and computers, ask it here. Other users will help you solve it!
Unanswered questions
Share your knowledge by helping others solve their problems