function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
גפן דרדושגפן דרדוש 

sending email to without tamplate for specific group

Hi,
In my org, each user can see specific contacts according to his role. 

We want to be able to send email with Salesforce, but without creating a template in advance. 

1. With "mass email": I can create views for sending mails to specific contacts, but I have to choose a template that I created in advance. 
2. With "Activity History"--> "Send an Email": I can write the body of the message, but the user see all the contacts in the org, not according to his role. 
I'm looking for a combination: 

I want that the user will be able to write an email without template and that he will see just his contacts (according to the role). 
Is it possible? 
​Thanks!
Shashikant SharmaShashikant Sharma
Hi,

You could try this.

Create a Visualforce Page, Show contacts according to your rules.

And Send Email from Apex Controller Class: http://www.sfdc99.com/2014/03/01/sending-emails-using-apex/

Thanks
Shashikant
גפן דרדושגפן דרדוש
Thank you! Do you know if it possible without Apex?
Shashikant SharmaShashikant Sharma
Other than Apex code you could try to make the Account, Contact Private and configure sharing rules for contact. By this way you could restrict contact visibilty to user and utilize the Send  Email. If it does not work then Apex code is the only option here.

Thanks
Shashikant