Created
August 29, 2017 07:05
-
-
Save herpiko/98c8ba59640466102cd0596149b820e0 to your computer and use it in GitHub Desktop.
Curl send email by smime text file, from https://stackoverflow.com/questions/14722556/using-curl-to-send-email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: "User Name" <username@gmail.com> | |
To: "John Smith" <john@example.com> | |
Subject: This is a test | |
Hi John, | |
I’m sending this mail with curl thru my gmail account. | |
Bye! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd \ | |
--mail-from 'username@gmail.com' --mail-rcpt 'john@example.com' \ | |
--upload-file mail.txt --user 'username@gmail.com:password' --insecure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment