Skip to content

Instantly share code, notes, and snippets.

@semeion
Forked from james2doyle/curl-smtp-email.sh
Created November 1, 2015 02: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 semeion/7f3a15a2b7f787ad3432 to your computer and use it in GitHub Desktop.
Save semeion/7f3a15a2b7f787ad3432 to your computer and use it in GitHub Desktop.
Send SMTP email using cURL
curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password"
\ --mail-from "sender@example.com" --mail-rcpt "destination@example.com"
\ -T email-contents.txt --ssl
From: "Sender Name" <sender@example.com>
To: "Destination Email" <destination@example.com>
Subject: Sending Using Curl
Hello,
I'm sending this mail with curl.
Bye!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment