5 answers
Hello,
This is how I have resolved it:
1) Enabled "Advanced Email Security Settings" by going into "Email to Salesforce" in Setup.
2) I went to the email account associated with my Salesforce account and verified my email address.Performing (2) which I have mentioned above has allowed me to send myself emails via Apex. I was trying to solve the "Get Started with Apex" Unit on Trailhead.