Last active
April 25, 2017 14:00
-
-
Save ggrandes/4a2cfef2fdf102420121 to your computer and use it in GitHub Desktop.
Sample Mail with cURL
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
#!/bin/bash | |
# Original Source: | |
# https://gist.github.com/ggrandes/4a2cfef2fdf102420121 | |
# | |
sed 's/$/\r/' | curl -q -f -sS -m 180 --retry 3 \ | |
--url "smtp://mailhost:25" \ | |
--mail-from "[email protected]" \ | |
--mail-rcpt "[email protected]" \ | |
--user "[email protected]:password" \ | |
--upload-file /dev/stdin <<"END" | |
Subject: This is a test | |
I'm sending this mail with curl. | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment