EmailMessage.addFileAsAttachment

Reads the local file and attaches it.

If attachmentFileName is null, it uses the filename of localFileName, without the directory.

If mimeType is null, it guesses one based on the local file name's file extension.

If these cannot be determined, it will throw an InvalidArgumentsException.

class EmailMessage
void
addFileAsAttachment
(,
string attachmentFileName = null
,
string mimeType = null
,
string id = null
)

Meta

History

Added October 28, 2024