Salesforce: Sending emails from communities doesn’t work
I’ve been doing a lot of work with Communities AKA Experience Sites recently and encountered an issue where emails sent using the Apex method Messaging.sendEmail() were not be received by the recipient. The strange thing was that the debug logs showed that the email had been successfully sent, and the associated Activity record had been created. And thus began many hours of debugging to understand the root cause and its fix. I tried the usual suspects: None of the above worked. When I checked the Email Logs there was still no entry for the email despite the Apex code saying it had successfully gone out. Then I came across an article in the Winter ’24 release notes saying the email addresses must be verified to send emails through Salesforce. Aha! Or so I thought. For standard Salesforce users, you’ll see “[Verified]” next to their email address. Or, if they’re not …