Trigger for E-Mail Notification in Salesforce

Sample Code:

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); String[] toAddresses = new String[] {'magulancse24@gmail.com'};
mail.setToAddresses(toAddresses);  
mail.setSubject('My Subject');   
mail.setUseSignature(false);   
mail.setHtmlBody(member.Name);    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });


Cheers!!!

No comments:

Post a Comment