Skip to content

Instantly share code, notes, and snippets.

@henno
Last active January 19, 2023 12:36
Show Gist options
  • Save henno/8ae23711e55154119b02ff41f0a92f61 to your computer and use it in GitHub Desktop.
Save henno/8ae23711e55154119b02ff41f0a92f61 to your computer and use it in GitHub Desktop.
How to send email with cURL
# 1. Create mymessage.txt:
Subject: Test Email
This is a test email sent from the command line using curl and STARTTLS.
# 2. Execute this CURL (https://curl.se/windows/) command:
curl --url "smtp://csmtp.telia.ee:587" --mail-from "[email protected]" --mail-rcpt "[email protected]" --upload-file mymessage.txt --user "[email protected]:U5ER1P455WORD" --ssl-reqd --tlsv1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment