0

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.setSubject(subject);
email_Custom.setToAddresses( toAddresses );
email_Custom.setPlainTextBody(plainBody);
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.

Regards

6
  • 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

-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.

Source:

https://developer.salesforce.com/forums/?id=906F0000000MN3GIAW

https://help.salesforce.com/s/articleView?id=000387977&type=1

https://help.salesforce.com/s/articleView?id=000381883&type=1

Hope it helps, buddy.

1

You must log in to answer this question.

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