+ Start a Discussion
Subhrajyoti NathSubhrajyoti Nath 

Send email to multiple recepient

HI everyone,

How  to send email to multiple recepients from vf page.
Best Answer chosen by Subhrajyoti Nath
Keyur  ModiKeyur Modi
You can use below code in method, and call that method in cummond button,
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

        String emailAddr = [select Email from User].Email;  //  In place of this you can use your list of Email ID.

        String[] toAddresses = new String[] {emailAddr};

        mail.setSubject('Email Alert ');

        mail.setPlainTextBody('Put your mail body here');
        mail.setHtmlBody('put the HTML body if necessary ');

        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

where in palce of toAddresses you can put your list of email addresses ,

Please let me know if this will help.

Keyur Modi