Activity Forums Salesforce® Discussions Messaging.EmailFileAttachment vs Messaging.singleEmailMessage in Salesforce?

  • Aman

    Member
    August 10, 2017 at 2:05 pm

    Hello shubham,

    SingleEmailMessage Methods :
    Contains methods for sending single email messages.
    Namespace
    Messaging
    Usage
    All base email (Email class) methods are also available to the SingleEmailMessage objects.

    Email properties are readable and writable. Each property has corresponding setter and getter methods. For example, the toAddresses() property is equivalent to the setToAddresses() and getToAddresses() methods. Only the setter methods are documented.

    EmailFileAttachment Class :
    EmailFileAttachment is used in SingleEmailMessage to specify attachments passed in as part of the request, as opposed to existing documents in Salesforce.

  • Parul

    Member
    September 16, 2018 at 3:04 pm

    SingleEmailMessage extends Email and inherits all of its methods. All base email (Email class) methods are also available to the SingleEmailMessage objects.

    Email properties are readable and writable. Each property has corresponding setter and getter methods. For example, the toAddresses() property is equivalent to the setToAddresses() and getToAddresses() methods. Only the setter methods are documented. However, the getTemplateName() method doesn’t have an equivalent setter method; use setTemplateId() to specify a template name.

     

    EmailFileAttachment is used in SingleEmailMessage to specify attachments passed in as part of the request, as opposed to existing documents in Salesforce.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos