You need to sign in to do that
Don't have an account?
Linked2Mark
In Getting Started with Apex
I am working through the SendEmail example and can't get my code to run. Can't figure out why.
I copied the code out of the example - removing all of the line numbers - into EmailManager.apxc
I copied the following Apex code into and anonymous debug window:
EmailManager em = new EmailManager();
em.sendMail('myemailaddress@gmail.com', 'Trailhead Tutorial', '123 body');
Window opens with the message:
Line: 2, Column: 1
Method does not exist or incorrect signature: [EmailManager].sendMail(String, String, String)
It cant see my method for some reason - any tips?
Example 1:- Email with Attachment https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_sendemail.htm
Example 2:- Please check below blog for step by step process
http://www.sfdc99.com/2014/03/01/sending-emails-using-apex/
Please let us know if this will help you.
Thanks
Amit Chaudhary