Skip to content

Instantly share code, notes, and snippets.

@benjamin-thomas
Created February 13, 2013 10:14
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/4943604 to your computer and use it in GitHub Desktop.
Save benjamin-thomas/4943604 to your computer and use it in GitHub Desktop.
The bare minimum to send an email attachment (monopart)
Content-Type: application/octet-stream;
Content-Transfer-Encoding: Base64
PHhtbD48bm9kZT5UaGlzIGlzIGEgbW9ub3BhcnQgYXR0YWNobWVudDwvbm9k
ZT48L3htbD4=
@benjamin-thomas
Copy link
Author

Use this command line tool to send the email

cat send_email_attachment_monopart.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