Hello, Friends, I am very happy to tell you all with this useful information. This post is only for Beginners. And for the experienced persons, this post helps them to refresh the things which they already know.
When we want to send an email to the external system from salesforce or receive the email from the external system then we use email programs. There are two types of emails.
1. Outbound email messaging 2. Inbound email messaging
Outbound email programs: Used to send an email to the external system using apex. There are two types of outbound emails.
1. SingleEmailMessage: Used to send a single email message.
Messaging.SingleEmailMessage varEmail = new Messaging.SingleEmailMessage();
2. MassEmailMessage: By using this we can send email to a list oh recipients.
Messaging.MassEmailMessage varMemail = new Messaging.MassEmailMessage();
Messaging name space provides classes/methods for salesforce outbound & inbound functionolities.
How can we send attachments? We can send attachments by using email file attachment. We will see examples later.
Inbound email programs: This will receive an email from the external system to Salesforce and the apex class will process the email, attachments and perform requested operations.
Stay tuned to salesforceupdates.com for more updates.