Adding attachments
The attachments array attaches files to your email. Each entry is an object with three fields: the MIME
type of the file, the filename shown to the recipient, and content containing the file’s bytes as a
base64-encoded string.
Limits
- Up to 1000 attachments per email.
- 30 MB combined limit on attachments and email content. Messages that exceed this are rejected.
Forbidden attachments
The following MIME types and file extensions are blocked because they are commonly associated with malware. Sending an
attachment with a forbidden type or extension returns an error.
MIME types
application/x-msdownload
application/vnd.ms-htmlhelp
application/java-archive
application/x-sh
application/x-shellscript
File extensions
.ade, .adp, .bat, .chm, .cmd, .com, .cpl, .exe, .hta, .ins, .isp, .jar, .jse,
.lib, .lnk, .mde, .msc, .msp, .mst, .pif, .scr, .sct, .sh, .shb, .sys, .vb,
.vbe, .vbs, .vxd, .wsc, .wsf, .wsh
Never send an attachment that you received from a user without first scanning it for viruses and malware.