You need to sign in to do that
Don't have an account?

Send Mass Email through Apex
How to send 100 emais at a time by using apex. ple can any one send me full code ....
You need to sign in to do that
Don't have an account?
How to send 100 emais at a time by using apex. ple can any one send me full code ....
List<Contact> conObj = [SELECT id, name FROM Contact LIMIT 100];
EmailTemplate e = [select id,name from EmailTemplate limit 1];
for(Integer i=0; i < conObj.size(); i++){
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
email.setTargetObjectId(conObj[i].Id);
email.setTemplateId(e.id);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { email });
}
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
thank u , and one more is Batch apex real time code send me ple...........
and small description like importance of each method ok
I have Doubts in Batch Apex:
1. which method execute fisrt ?
2.relation b/w start and execute method ?
3.importance for finish method.
Hi,
You can get all those you want regarding batch apex here
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks