+ Start a Discussion

How to read the email subject and body from the visual force email templates after sending an email



I am sending email using visual force email templates with merge fields. i want to read the email subject and body after sending the email. how can i do this.


please help me

Venkat PolisettVenkat Polisett


select ( select subject, description from activityHistories

      where subject like 'Email:%' 

order by createddate desc limit 10 ) from account LIMIT 1



The above query will give you the last 10 activity history emails. Change the where clause to your liking.