EmailFileAttachment Class

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

Namespace

Messaging

EmailFileAttachment Constructors

The following are constructors for EmailFileAttachment.

EmailFileAttachment()

Creates a new instance of the Messaging.EmailFileAttachment class.

Signature

public EmailFileAttachment()

EmailFileAttachment Properties

The following are properties for EmailFileAttachment.

  • body
    Gets or sets the attachment itself.
  • contenttype
    Gets or sets the attachment's Content-Type.
  • filename
    Gets or sets the name of the file to attach.
  • id
    Read-Only. Gets the attachment ID.
  • inline
    Specifies a Content-Disposition of inline (true) or attachment (false).

body

Gets or sets the attachment itself.

Signature

public Blob body {get; set;}

Property Value

Type: Blob

contenttype

Gets or sets the attachment's Content-Type.

Signature

public String contenttype {get; set;}

Property Value

Type: String

filename

Gets or sets the name of the file to attach.

Signature

public String filename {get; set;}

Property Value

Type: String

id

Read-Only. Gets the attachment ID.

Signature

public Id id {get;}

Property Value

Type: Id

inline

Specifies a Content-Disposition of inline (true) or attachment (false).

Signature

public Boolean inline {get; set;}

Property Value

Type: Boolean