[{"data":1,"prerenderedAt":13},["ShallowReactive",2],{"$fKp9zXVpdmr2iEbt-WgUilb-S3_fO13Z5x-LR65AweZ0":3},{"title":4,"slug":5,"excerpt":6,"category":7,"order":8,"screens":9,"html":12},"Attachment processing","attachment-processing","How EmailConnect handles email attachments and delivers them to your webhooks","configuration",6,[10,11],"logs","aliases","\u003Cp>EmailConnect provides flexible options for handling email attachments, from simple inline delivery to cloud storage integration.\u003C\u002Fp>\n\u003Ch2>Processing options\u003C\u002Fh2>\n\u003Cp>When configuring an alias, you can choose how attachments are processed:\u003C\u002Fp>\n\u003Ch3>Inline (default)\u003C\u002Fh3>\n\u003Cp>Attachments are Base64-encoded and included directly in the webhook payload.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>How it works:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Col>\n\u003Cli>Email arrives with attachment\u003C\u002Fli>\n\u003Cli>Attachment is converted to Base64\u003C\u002Fli>\n\u003Cli>Encoded content is included in the webhook JSON\u003C\u002Fli>\n\u003Cli>Your application decodes and processes the file\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cstrong>Payload example:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  &quot;attachments&quot;: [\n    {\n      &quot;filename&quot;: &quot;invoice.pdf&quot;,\n      &quot;contentType&quot;: &quot;application\u002Fpdf&quot;,\n      &quot;size&quot;: 125840,\n      &quot;content&quot;: &quot;JVBERi0xLjQKJeHp69MKMSAwIG9iago8PC9UeX...&quot;,\n      &quot;virusScan&quot;: { &quot;status&quot;: &quot;clean&quot; }\n    }\n  ]\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cstrong>Best for:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Small to medium attachments (under 10MB)\u003C\u002Fli>\n\u003Cli>Simple webhook endpoints\u003C\u002Fli>\n\u003Cli>Quick prototypes and MVPs\u003C\u002Fli>\n\u003Cli>When you need immediate file access\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Considerations:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Increases webhook payload size\u003C\u002Fli>\n\u003Cli>May hit size limits on some webhook receivers\u003C\u002Fli>\n\u003Cli>Higher memory usage during processing\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Managed S3 storage\u003C\u002Fh3>\n\u003Cp>Attachments are uploaded to EmailConnect&#39;s managed S3 storage, and your webhook receives secure URLs.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>How it works:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Col>\n\u003Cli>Email arrives with attachment\u003C\u002Fli>\n\u003Cli>Attachment is uploaded to managed S3 storage\u003C\u002Fli>\n\u003Cli>Webhook receives a pre-signed URL\u003C\u002Fli>\n\u003Cli>Your application downloads the file when needed\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cstrong>Payload example:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  &quot;attachments&quot;: [\n    {\n      &quot;filename&quot;: &quot;invoice.pdf&quot;,\n      &quot;contentType&quot;: &quot;application\u002Fpdf&quot;,\n      &quot;size&quot;: 125840,\n      &quot;url&quot;: &quot;https:\u002F\u002Fstatic.emailconnect.eu\u002Fattachments\u002F...&quot;,\n      &quot;status&quot;: &quot;completed&quot;,\n      &quot;virusScan&quot;: { &quot;status&quot;: &quot;clean&quot; }\n    }\n  ]\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>\u003Cstrong>Best for:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Large attachments (over 10MB)\u003C\u002Fli>\n\u003Cli>High-volume processing\u003C\u002Fli>\n\u003Cli>When webhook endpoints have size limits\u003C\u002Fli>\n\u003Cli>Deferred processing workflows\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Considerations:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Requires additional HTTP request to fetch files\u003C\u002Fli>\n\u003Cli>URLs expire after a set period\u003C\u002Fli>\n\u003Cli>Slight processing delay for upload\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Custom S3 storage\u003C\u002Fh3>\n\u003Cp>Configure your own S3-compatible bucket for full control over attachment storage.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>How it works:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Col>\n\u003Cli>Email arrives with attachment\u003C\u002Fli>\n\u003Cli>Attachment is uploaded directly to your bucket\u003C\u002Fli>\n\u003Cli>Webhook receives the file location in your bucket\u003C\u002Fli>\n\u003Cli>You control retention, access, and lifecycle\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>\u003Cstrong>Required configuration:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Bucket name\u003C\u002Fli>\n\u003Cli>Region\u003C\u002Fli>\n\u003Cli>Access key ID\u003C\u002Fli>\n\u003Cli>Secret access key\u003C\u002Fli>\n\u003Cli>Optional: custom endpoint (for S3-compatible services)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Best for:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Corporate compliance requirements\u003C\u002Fli>\n\u003Cli>Long-term file retention\u003C\u002Fli>\n\u003Cli>Custom access policies\u003C\u002Fli>\n\u003Cli>High-volume cost optimization\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cstrong>Compatible services:\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cul>\n\u003Cli>AWS S3\u003C\u002Fli>\n\u003Cli>MinIO\u003C\u002Fli>\n\u003Cli>Backblaze B2\u003C\u002Fli>\n\u003Cli>DigitalOcean Spaces\u003C\u002Fli>\n\u003Cli>Cloudflare R2\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Attachment metadata\u003C\u002Fh2>\n\u003Cp>Regardless of processing mode, each attachment includes:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Field\u003C\u002Fth>\n\u003Cth>Description\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ccode>filename\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Original file name\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>contentType\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>MIME type (e.g., \u003Ccode>application\u002Fpdf\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>size\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>File size in bytes\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>content\u003C\u002Fcode> or \u003Ccode>url\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Base64 content or download URL\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Ch2>Size limits\u003C\u002Fh2>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Plan\u003C\u002Fth>\n\u003Cth>Max attachment size\u003C\u002Fth>\n\u003Cth>Max total per email\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>Free\u003C\u002Ftd>\n\u003Ctd>Not available\u003C\u002Ftd>\n\u003Ctd>Not available\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Maker\u003C\u002Ftd>\n\u003Ctd>10 MB (configurable)\u003C\u002Ftd>\n\u003Ctd>10 MB\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Business\u003C\u002Ftd>\n\u003Ctd>10 MB (configurable)\u003C\u002Ftd>\n\u003Ctd>10 MB\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Platform\u003C\u002Ftd>\n\u003Ctd>10 MB (configurable)\u003C\u002Ftd>\n\u003Ctd>10 MB\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\n\u003Cp>Emails exceeding size limits are rejected with an appropriate error message to the sender.\u003C\u002Fp>\n\u003Ch2>Security considerations\u003C\u002Fh2>\n\u003Ch3>Virus scanning\u003C\u002Fh3>\n\u003Cp>Available on \u003Cstrong>Business+\u003C\u002Fstrong> plans. Every attachment is scanned for malware before delivery. Clean files are delivered normally with scan metadata; infected files are rejected and excluded from the payload.\u003C\u002Fp>\n\u003Cp>See \u003Ca href=\"\u002Fhelp\u002Fvirus-scanning\u002F\">Virus scanning\u003C\u002Fa> for full details on how scanning works, definition updates, and testing with the EICAR test file.\u003C\u002Fp>\n\u003Ch3>File type filtering\u003C\u002Fh3>\n\u003Cp>Use \u003Ca href=\"\u002Fhelp\u002Falias-rules\u002F\">alias rules\u003C\u002Fa> to block specific file types:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Executable files (\u003Ccode>.exe\u003C\u002Fcode>, \u003Ccode>.bat\u003C\u002Fcode>, \u003Ccode>.cmd\u003C\u002Fcode>)\u003C\u002Fli>\n\u003Cli>Scripts (\u003Ccode>.js\u003C\u002Fcode>, \u003Ccode>.vbs\u003C\u002Fcode>, \u003Ccode>.ps1\u003C\u002Fcode>)\u003C\u002Fli>\n\u003Cli>Compressed archives (optional)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Content validation\u003C\u002Fh3>\n\u003Cp>While we scan for malware, always validate and sanitize attachments in your application before processing.\u003C\u002Fp>\n\u003Ch2>Processing attachments in your application\u003C\u002Fh2>\n\u003Ch3>Decoding Base64 (inline mode)\u003C\u002Fh3>\n\u003Ch3>Node.js\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-javascript\">const buffer = Buffer.from(attachment.content, &#39;base64&#39;);\nfs.writeFileSync(attachment.filename, buffer);\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Python\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-python\">import base64\n\ncontent = base64.b64decode(attachment[&#39;content&#39;])\nwith open(attachment[&#39;filename&#39;], &#39;wb&#39;) as f:\n    f.write(content)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Downloading from URL (S3 mode)\u003C\u002Fh3>\n\u003Ch3>Node.js\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-javascript\">const response = await fetch(attachment.url);\nconst buffer = await response.arrayBuffer();\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Python\u003C\u002Fh3>\n\u003Cpre>\u003Ccode class=\"language-python\">import requests\n\nresponse = requests.get(attachment[&#39;url&#39;])\ncontent = response.content\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Common use cases\u003C\u002Fh2>\n\u003Ch3>Document processing\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Store in managed S3 for batch OCR processing\u003C\u002Fli>\n\u003Cli>Use inline for real-time document analysis\u003C\u002Fli>\n\u003Cli>Filter to accept only PDF and Office formats\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Image handling\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Inline for thumbnail generation\u003C\u002Fli>\n\u003Cli>Managed S3 storage for high-resolution archives\u003C\u002Fli>\n\u003Cli>Custom S3 for CDN integration\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch3>Compliance archival\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Custom S3 for regulated data storage\u003C\u002Fli>\n\u003Cli>Configure retention policies in your bucket\u003C\u002Fli>\n\u003Cli>Maintain audit trails with your infrastructure\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2>Related topics\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Fvirus-scanning\u002F\">Virus scanning\u003C\u002Fa> - How ClamAV scans attachments for malware\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Falias-options-explained\u002F\">Alias options\u003C\u002Fa> - Configure attachment processing per alias\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Falias-rules\u002F\">Alias rules\u003C\u002Fa> - Filter emails by attachment type\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fhelp\u002Fdata-retention\u002F\">Data retention\u003C\u002Fa> - How long data is stored\u003C\u002Fli>\n\u003C\u002Ful>\n",1781207679675]