mail

Simpelster Mail-Versand:

echo 'Body' | mail root

Mail-Versand über Port 25 (SMTP) mit Betreff, Absender und Empfänger:

echo 'Body' | mail \
    -s "Subject" \
    -r noreply@example.com \
    recipient@example.com

Mail über Port 587 (SMTP mit STARTTLS) senden:

echo 'Body' | mail \
    -s "Subject" \
    -S smtp="mail.example.com:587" \
    -S smtp-use-starttls \
    -S smtp-auth=login \
    -S smtp-auth-user=noreply@example.com \
    -S smtp-auth-password=linuxfabrik \
    -S ssl-verify=ignore \
    -r noreply@example.com \
    recipient@example.com

Built on 2024-04-18