You need to sign in to do that
Don't have an account?
venkateshyadav1243
how to send email from trigger?
how to send email from trigger?
can any one help me how to i write trigger am new to trigger can any write code take two example and help me
thanks for advance alll.
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
String[] toAddresses = new String[] {a.CreatedBy.Email};
mail.setToAddresses(toAddresses);
mail.setSubject('Apex Sharing Recalculation ' + a.Status);
mail.setPlainTextBody
('The batch Apex job processed ' + a.TotalJobItems +
' batches with '+ a.NumberOfErrors + ' failures.');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
but there is a limit u cna not send more then 10 email in one run
thanks for your reply
I believe you can achieve this via Workflow ( with action Email)...
hope that hepls..