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

What is the best solution to create a Button to send email to multiple contacts in Contact Related List?
I need to create a button on contact related list so that I can send email to selected multiple contacts. What would be the best solution and best practices?
This is also the Apex Class
I have tested this and works perfectly fine. so resut assure about the results.
Regards,
Mark Khabosha
All Answers
Well, to make it completely I don't know how, but I know that you'll need to create a Visualforce Page with a custom controller (that would be a class Apex with method to send email) and a Custom Button in the Object (Contact) which is the easiest.
However, you can do the next, on related list, put a custom button in Contact Object that Update a field of Contact and select the contacts which you want, for example, the field "Contact Status", and then when the value of this field updated for "Sent", with automation process Worflow Rules, create an action on Worflow rules that send email when the "Contact Status" is equal to "Sent". This way to solve your problem eliminates the need to create an Apex Class, and you'll need only a Custom Button in Object Contact and a Visualforce Page with Standardcontroller = "Contact".
So, I really don't know how do that completely, but I thought very interesting this question and I hope that someone can answer, cause I would like know how do that.
I hope I have been helpful in something!
Good work !
Create a java script button list button and select display checkboxes(for multi-Record selection) myEmailClass - Its the apex class
emailContact - method name
{Id:varselectedContactIds} - method parameter
If you want user to type the content of the email after clicking the button then you have to go with visualforce page and controller for the email logic
This is the corrected code for the java script button in the contract related list.
Please let me know if you have any questions.
Mark
This is also the Apex Class
I have tested this and works perfectly fine. so resut assure about the results.
Regards,
Mark Khabosha