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" <noreply@your-smtp-server.co>
To: "John Smith" <to-who@yahoo.com>
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 'noreply@your-smtp-server.co' \
--mail-rcpt 'to-who@yahoo.com' \
--upload-file email.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment