Send email

Sending limits

Check these recipient, message-size, and attachment limits before you send email through the API or SMTP relay.

Maximum recipients

Each email can have a maximum of 50 recipients combined across the to, cc, and bcc fields. This limit applies to the REST API, including each email in a batch, and to the SMTP relay.

FieldDescription
toPrimary recipients
ccCarbon copy recipients
bccBlind carbon copy recipients
TotalMaximum 50 combined

Emails exceeding 50 recipients (combined) will be rejected. For larger recipient lists, use the batch sending endpoint, which sends up to 500 emails per request, each with up to 50 recipients.

This limit aligns with transactional email best practices. Transactional emails (receipts, notifications, password resets) are typically sent to a small number of recipients. If you need to send to larger lists, consider:

  • Using the batch API for sending the same email to multiple recipients
  • Splitting large recipient lists into multiple API calls
  • Using broadcast routes for marketing or newsletter-style emails

Email size limit

The maximum size for an email message (including all attachments) is 25MB. This limit includes:

  • The email body (HTML and plain text)
  • All attachments (base64 encoded)
  • Headers and metadata

Emails exceeding 25MB will be rejected with an error. Consider using external file hosting services for large files and including download links in your email instead.

Over SMTP, an email over the size limit gets a 552 reply. See SMTP response codes.

Request size limit

A request to the API can be at most 25MB. This counts the whole JSON request body, including base64-encoded attachments, and applies to the single send and the batch endpoints.

A larger request is rejected with 413 Request Entity Too Large, and nothing in it is sent. For a batch, this means none of its emails are sent, even when the batch has 500 emails or fewer. Split large batches into several requests that each stay under 25MB.

Header formatting

Send the subject, display names, custom header values and attachment filenames as plain text. Lettermint encodes them for the email standards when it builds the message. Text that is already ASCII goes out unchanged, and only text with other characters is encoded. Spam filters such as Rspamd add points for headers that are encoded without a reason, so leave the encoding to Lettermint.

Lettermint repairs small formatting errors in headers before it sends the email:

  • Line breaks and tabs become spaces, and other control characters are removed.
  • In the subject and display names, text you encoded yourself, such as =?UTF-8?Q?Hello?=, is decoded and encoded again only if it needs to be. Other custom header values keep their content, because they can hold data such as JSON.
  • A header name with spaces or a trailing colon is fixed, so X Custom Header: becomes X-Custom-Header.
  • References and In-Reply-To get angle brackets around each message ID. Values that are not message IDs are removed.
  • List-Unsubscribe and the other list URL headers get angle brackets around each URL, and a bare email address becomes a mailto: URL.
  • A display name longer than 255 characters is shortened.

The API rejects a header name that is still not valid after this, such as one with a colon or non-ASCII characters inside it. It also rejects a List-Unsubscribe or other list URL header that contains no usable URL. Lettermint removes any other header it cannot repair, including such headers in SMTP messages.

Blocked attachments

For security reasons, certain file types are blocked from being sent as attachments. These restrictions help protect recipients from potentially malicious files.

Over SMTP, an email with a blocked attachment gets a 550 5.7.1 reply that names the file extension or content type. See SMTP response codes.

Blocked file types

The following table lists all blocked file extensions and their associated MIME types, organized by category:

Executable files & applications

ExtensionMIME Type(s)Description
.exeapplication/x-msdownload, application/x-executable, application/octet-stream-exeWindows executable
.comapplication/x-msdownload, application/x-msdos-programDOS command file
.appapplication/x-ms-applicationApplication file
.msiapplication/x-msi, application/x-ms-installerWindows installer package
.mspapplication/x-msiWindows installer patch
.mstapplication/x-msiWindows installer transform
.gadgetapplication/gadget, application/x-gadgetWindows gadget
.dllapplication/x-msdownloadDynamic link library
.jarapplication/java-archiveJava archive

Script files

ExtensionMIME Type(s)Description
.batapplication/x-bat, application/x-cmdBatch file
.cmdapplication/x-cmd, application/x-batCommand script
.ps1application/x-powershell, text/x-powershellPowerShell script
.ps1xmlapplication/x-powershellPowerShell XML
.ps2application/x-powershell, text/x-powershellPowerShell v2 script
.ps2xmlapplication/x-powershellPowerShell v2 XML
.psc1application/x-powershellPowerShell console file
.psc2application/x-powershellPowerShell v2 console file
.vbapplication/x-vb, text/vbscriptVisual Basic file
.vbsapplication/x-vbs, text/vbscriptVBScript file
.vbeapplication/x-vbe, text/vbscriptEncoded VBScript
.jsapplication/javascript, application/x-javascript, text/javascript, text/x-scriptJavaScript file
.jseapplication/x-javascript, text/jscriptEncoded JavaScript
.wstext/x-scriptWindows script
.wsftext/x-scriptWindows script file
.wsctext/x-scriptWindows script component
.wshtext/x-scriptWindows script host
.shapplication/x-shellscript, application/x-shShell script
.cshapplication/x-cshC shell script
.kshapplication/x-shellscriptKorn shell script
.aspapplication/x-asp, application/asp, text/asp, text/x-aspActive Server Page

System & configuration files

ExtensionMIME Type(s)Description
.sysapplication/x-sys, application/octet-stream-sysSystem file
.cplapplication/x-msdownloadControl panel item
.scrapplication/x-msdownloadScreen saver
.regapplication/x-regRegistry file
.inftext/plainSetup information file
.crtapplication/x-crtCertificate file
.cerapplication/x-crtSecurity certificate
.derapplication/x-crtDER certificate

Microsoft office & access

ExtensionMIME Type(s)Description
.mdbapplication/x-msaccess, application/vnd.ms-accessAccess database
.mdeapplication/x-msaccessAccess compiled database
.mdaapplication/x-msaccessAccess add-in
.mdtapplication/x-msaccessAccess data file
.mdwapplication/x-msaccessAccess workgroup
.mdzapplication/x-msaccessAccess wizard
.accdbapplication/x-msaccessAccess 2007+ database
.adeapplication/x-msaccessAccess project extension
.adpapplication/x-msaccessAccess project
.madapplication/x-msaccessAccess module
.mafapplication/x-msaccessAccess file
.magapplication/x-msaccessAccess diagram
.mamapplication/x-msaccessAccess macro
.maqapplication/x-msaccessAccess query
.marapplication/x-msaccessAccess report
.masapplication/x-msaccessAccess stored procedure
.matapplication/x-msaccessAccess table
.mauapplication/x-msaccessAccess user
.mavapplication/x-msaccessAccess view
.mawapplication/x-msaccessAccess web
.pubapplication/x-mspublisherPublisher document
.vsmacrosapplication/vnd.ms-vsmacrosVisual Studio macros

Web & browser files

ExtensionMIME Type(s)Description
.htaapplication/htaHTML application
.htm(when containing scripts)HTML file
.html(when containing scripts)HTML file
.urltext/x-urlInternet shortcut
.mhtmlVariousWeb archive

Help & documentation

ExtensionMIME Type(s)Description
.chmapplication/vnd.ms-htmlhelp, application/x-chmCompiled HTML help
.hlpapplication/winhlpWindows help file
.itsRelated to help filesInternet document set

Shell & shortcuts

ExtensionMIME Type(s)Description
.lnkapplication/x-ms-shortcutWindows shortcut
.pifapplication/x-pifProgram information file
.shbShell fileShell scrap object
.shsShell fileShell scrap object
.scfapplication/x-explorer-commandWindows Explorer command
.scttext/scriptletWindows script component
.xnkExchange shortcutExchange shortcut

Installer & package files

ExtensionMIME Type(s)Description
.insapplication/x-internet-signupInternet settings
.ispapplication/x-internet-signupInternet service provider
.libapplication/x-archiveLibrary file
.mscapplication/x-mscManagement console
.opsOffice profileOffice profile settings
.pcdPhoto CDPhoto CD image
.prgProgram fileProgram file
.fxpFoxProFoxPro compiled

Visual studio & development

ExtensionMIME Type(s)Description
.vssapplication/vnd.visioVisio stencil
.vstapplication/vnd.visioVisio template
.vswapplication/vnd.visioVisio workspace
.vxdVirtual deviceVirtual device driver

Media files

ExtensionMIME Type(s)Description
.wmzapplication/x-ms-wmzWindows Media skin
.emfapplication/x-msmetafileEnhanced metafile

FoxPro files

ExtensionMIME Type(s)Description
.basBASIC sourceBASIC source code
.prfSettings fileProfile settings
.plgPlugin filePlugin file
.mshScript shellMicrosoft Shell
.msh1Script shellMicrosoft Shell v1
.msh2Script shellMicrosoft Shell v2
.mshxmlScript shell XMLMicrosoft Shell XML
.msh1xmlScript shell v1 XMLMicrosoft Shell v1 XML
.msh2xmlScript shell v2 XMLMicrosoft Shell v2 XML

Temporary files

ExtensionMIME Type(s)Description
.tmpVariousTemporary file

Miscellaneous

ExtensionMIME Type(s)Description
.applicationapplication/x-ms-applicationClickOnce deployment
.obdOffice binderOffice binder document
.mvbMultimedia viewerMultimedia viewer file
.vpsVirtual private serverVPS file

Additional MIME type restrictions

The blocked-file policy reports these MIME types:

  • application/asp
  • application/gadget
  • application/hta
  • application/java-archive
  • application/javascript
  • application/octet-stream
  • application/octet-stream-exe
  • application/octet-stream-sys
  • application/vnd.ms-access
  • application/vnd.ms-htmlhelp
  • application/vnd.ms-vsmacros
  • application/x-asp
  • application/x-bat
  • application/x-chm
  • application/x-cmd
  • application/x-crt
  • application/x-csh
  • application/x-executable
  • application/x-gadget
  • application/x-javascript
  • application/x-ms-application
  • application/x-ms-installer
  • application/x-ms-shortcut
  • application/x-ms-wmz
  • application/x-msaccess
  • application/x-msbinder
  • application/x-msdos-program
  • application/x-msdownload
  • application/x-msi
  • application/x-msmediaview
  • application/x-msmetafile
  • application/x-mspublisher
  • application/x-msscript
  • application/x-powershell
  • application/x-reg
  • application/x-sh
  • application/x-shellscript
  • application/x-sys
  • application/x-vb
  • application/x-vbs
  • text/asp
  • text/javascript
  • text/jscript
  • text/scriptlet
  • text/vbscript
  • text/x-asp
  • text/x-powershell
  • text/x-script

Why these restrictions?

These file types are blocked because they can:

  • Execute code automatically when opened
  • Exploit vulnerabilities in email clients or operating systems
  • Bypass security measures through social engineering
  • Contain macros or scripts that could harm the recipient's system
  • Be used to spread malware or ransomware

Most business documents (PDF, DOCX, XLSX), images (JPG, PNG, GIF), and common file formats are allowed. The restrictions focus on executable and script files that pose security risks.