If there is requirement to create a mailto link in the email you are sending to the user with the username.While click will be done by the end user on the username mentioned in the email, it should open a new window in the email sending software you are using may be outlook or gmail etc.
so below steps you need to follow:
- First you need to fetch two things : The username and the user’s email.
- Copy the value of username in a string and same for user’s email.
- String RMName=opplist[0].Owner.name;//Opportunity Owner Name
String RMemailid=opplist[0].Owner.email;//Opportunity Owner Email - String maillink=’mailto:’+RMemailid;
- Put this string in html body of the email like this where you need.

- Done.
- Send you email with the html body.
Any suggestions!!!!!!!
Leave a comment