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
Dany Flipkart appDany Flipkart app 

how to send email all customers based on enter email field send that particular person and how to pass the values in email

User-added image
PriyaPriya (Salesforce Developers) 

Hey Dany,

You can create an apex class and decalre a variable to store email address.

Now on Visualforce page, where you are using input text field, add attribute called valu and enter that variable. Thats means, whatever value you enter in that input text, that will store in the variable.

Once you got the value in variable, now use SingleEmailMessage concept in apex class to send the email. 

Here is the sample code :- 
https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_email_outbound_single.htm

 

Kindly mark it as the best answer if it works for you.

 

Thanks & Regards,

Priya Ranjan