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
ChubbyChubby 

Can we resend a specific mail once mail is sent in activity history

Hi All,
I have a requirement stating when I send an email using Send Email button in Activity history and open it by clicking subject, I want to place Resend button. When I click Resend that particular mail should go again. How can we do this? please sugest me which approach i can follow.

Thanks.
Sonali_takkeSonali_takke
Hi Chubby,

You can try following approach.
1.Create Custom Button on Email Message Object .Onclick of this button call one vf page 
2.Pass vf page id of emailmessage as a parameter.You can get it  from url .
3.Add this button to layout of Emailmessage
4.Call controller action from vf page which queries all fields for same email message id.
5.Create new instance Emailmessage and assign it with all the fields you get from query.
6.send an email.


Thank you
ChubbyChubby
Hi Dev341,

Thanks for your response. could you please share sample code if you have any.
Can we do this by writing javascript alone on button click?

Thanks.