Skip to content

Instantly share code, notes, and snippets.

@wuriyanto48
Created July 9, 2024 15:10
Show Gist options
  • Save wuriyanto48/35e8099381bd5e3e3532a7bb1bdffc0a to your computer and use it in GitHub Desktop.
Save wuriyanto48/35e8099381bd5e3e3532a7bb1bdffc0a to your computer and use it in GitHub Desktop.
send email command line
From: "User Name" <[email protected]>
To: "John Smith" <[email protected]>
Subject: This is a test
Hi John,
I’m sending this mail with curl thru my gmail account.
Bye!
#!/usr/bin/env bash
curl -v --ssl-reqd \
--url 'smtps://your-smtp-server.co:465' \
--user 'username:password' \
--mail-from '[email protected]' \
--mail-rcpt '[email protected]' \
--upload-file email.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment