Skip to content

Instantly share code, notes, and snippets.

View OdysseasKr's full-sized avatar
⌨️

Odysseas (Ody) Krystalakos OdysseasKr

⌨️
View GitHub Profile
@OdysseasKr
OdysseasKr / send_email_with_curl.sh
Created July 4, 2023 10:30
A simple script that sends emails from bash using CURL
#!/bin/bash
# Change these details accordingly
SMTP_HOST='smtps://smtp.gmail.com:465'
SENDER_EMAIL='youremail@example.com'
SENDER_PASSWORD='yourpassword'
RECEIVER_EMAIL='receiver@example.com'
# Generate body of email in a file
echo "From: $SENDER_EMAIL" > emailbody