This currently uses AttachmentScanner.com , which is a free service (I think it uses ClamAV internally at the moment).
Variable | Example value | Remarks |
---|---|---|
SPARKPOST_API_KEY | abcdef | Get a free account from SparkPost |
FROM_EMAIL | [email protected] |
Used for automated service replies. Could be anything you like. Needs to be a sending-domain you've registered with SparkPost |
ATTACHMENTSCANNER_API_KEY | abcd | Get from AttachmentScanner signup |
HELPDESK_ENDPOINT | https://example.com | RequestBin or Runscope makes a great display endpoint, if you don't have one of your own |
MAX_ATTACHMENT_SIZE | 4194304 | Maximum size (bytes) of any single attachement that should be accepted |
AWS Lambda has an annoyingly small Invoke request body payload size limit of 6MB.
If you send emails into this service which (with MIME encoding and JSONification) produce a payload that's too large,
SparkPost will just keep trying to deliver to your endpoint on a retry schedule. Your code will never see the payload
because Lambda rejects it upstream returning a 413
error.