Hi friends,
This post shows how to send Email with Attachment using Apex Controller and VF Page.
I am writing this post because it’s a common requirement to sends emails from salesforce with attachment to clients, contacts etc.
As per my knowledge there are two ways to send email from Apex:-
1.
By using email templates.
2.
By using Messaging class.
Here I am using Messaging class for sending email from apex class:-
Screen shots:-
hope it helps, happy coding...
Good Article Anurag ..
ReplyDeletethanks vineeth... :)
ReplyDeleteGood one!
ReplyDeletethanks yeluri.
Deletehi guys,
ReplyDeletemy requirment is similar to this, but ineed attachments from visualforce page(alresdy i create and fetech my attachments to that page and as well as emailtemplates also from another visualforce page (i created)
here my requirement is to send attachments and emailtemplates to selective contact emailids ids)
can anyone know this code please post
ReplyDeleteadvance thanks guys.