Skip to content

Instantly share code, notes, and snippets.

@benjamin-thomas
Created February 13, 2013 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjamin-thomas/4943617 to your computer and use it in GitHub Desktop.
Save benjamin-thomas/4943617 to your computer and use it in GitHub Desktop.
The bare minimum to send an email attachment (multipart)
MIME-Version: 1.0
Content-Type: multipart/mixed;boundary="-----------MIME_BOUNDARY
-------------MIME_BOUNDARY
Content-Type: application/octet-stream;
Content-Transfer-Encoding: Base64
PHhtbD48bm9kZT5UaGlzIGlzIGEgbXVsdGlwYXJ0IGF0dGFjaG1lbnQ8L25v
ZGU+PC94bWw+
@benjamin-thomas
Copy link
Author

Use this command line tool to send the email

cat send_email_attachment_multipart.eml  | msmtp --debug --host=smtp.destination.com --domain=mydomain.com --port=25 user@destination.com

Or with netcat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment