I am executing below simple lines of code to trigger an email to my Inbox. I am not receiving the mail and also I see on the logs that there are no errors Access level is already All Email in my org.

Please could anyone having knowledge of possible issue and solution, kindly comment. Thanks

Apex code executed from Anonymous Window:

Messaging.SingleEmailMessage email_Custom =new Messaging.SingleEmailMessage();
String[] toAddresses = new list<string> {'[email protected]'};
string subject='test';
string plainBody='test';
email_Custom.setToAddresses( toAddresses );
Messaging.SendEmailResult [] r = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email_Custom});
system.debug('r --> ' + r);

Logs :

13:04:35:426 USER_DEBUG [8]|DEBUG|r --> (Messaging.SendEmailResult[getErrors=();isSuccess=true;])

Noticed that even thru email send button from the Salesforce org (case or contact or lead Object) , mails are not being received.


  • 4
    Did you test email deliverability to your email ? Aug 5, 2022 at 7:51
  • Ensure you are checking your spam folder Aug 5, 2022 at 7:52
  • @NagendraSingh - Yes tested email deliverability to your email Aug 5, 2022 at 9:18
  • @CloudConnect - Yes checked the same. Have not received mail. Aug 5, 2022 at 9:19
  • Can you navigate to setup> Email Logfiles> Request logs for the time the action is being performed on the dev console > Look for the Mail Event value ? Does it show R/D/T/P ? Aug 5, 2022 at 9:44

1 Answer 1


I am facing a similar issue. In my client's org, all emails worked fine, but since a couple days back some stopped coming. I went to some research and found this. Might be related to the Salesforce Instance you are using and when it is being refreshed. So, if I got it right, we need to open a Salesforce Case to get help.





Hope it helps, buddy.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .