sendemail
SendEmail is a lightweight, command line SMTP email client designed for use in scripts and programs. It requires no special modules and offers a straightforward interface for sending emails.
Description
SendEmail is a Perl-based SMTP email agent that operates entirely from the command line. It is optimized for integration into bash scripts, Perl programs, and web sites, making it ideal for automated email delivery tasks. Its simplicity and lack of dependency on special modules make it highly portable and easy to deploy in various environments.
The tool supports essential email features like attachments, CC/BCC recipients, and SMTP authentication. It is particularly useful in cybersecurity contexts, such as phishing simulations, as highlighted in Kali Linux training materials like PEN-300 for creating custom calendar invites.
SendEmail provides verbose logging, quiet modes, and advanced options for message formatting and networking, allowing fine-tuned control over email transmission.
How It Works
SendEmail connects to an SMTP server (default localhost:25) to relay emails using standard SMTP protocols. It supports authentication via username/password, TLS options through advanced flags, and can bind to specific local addresses. Messages are constructed from provided body text, STDIN, or files, with support for MIME attachments and content types like text or HTML. It can also use local sendmail instead of direct network MTA.
Installation
sudo apt install sendemailFlags
Examples
sendemail -hsendemail -f sender@example.com -t recipient@example.com -u "Subject" -m "Message body"sendemail -f sender@example.com -t recipient@example.com -cc cc@example.com -bcc bcc@example.com -u "Subject" -m "Message"sendemail -f sender@example.com -t recipient@example.com -u "Subject" -m "Message" -s smtp.example.com:587sendemail -f sender@example.com -t recipient@example.com -u "Subject" -m "Message" -a attachment.txtsendemail -f sender@example.com -t recipient@example.com -u "Subject" -m "Message" -xu username -xp passwordsendemail -f sender@example.com -t recipient@example.com -u "Subject" -m "Message" -v -l /path/to/logfile