morristech
5/22/2019 - 5:29 PM

Send SMTP email using cURL

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!