Skip to content

Instantly share code, notes, and snippets.

@leonirlopes
Forked from james2doyle/curl-smtp-email.sh
Created March 31, 2017 12:24
Show Gist options
  • Save leonirlopes/f729ec97c6943e30309f186108331394 to your computer and use it in GitHub Desktop.
Save leonirlopes/f729ec97c6943e30309f186108331394 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 "[email protected]" --mail-rcpt "[email protected]"
\ -T email-contents.txt --ssl
From: "Sender Name" <[email protected]>
To: "Destination Email" <[email protected]>
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