Mailstrom is a command-line script for sending emails via SMTP or Amazon SES.
It behaves similarly to the UNIX
$> echo "Testing" | bin/mailstrom -s "My Subject" email@example.com
It can also be used interactively to write emails, just like
$> mail -s "My Subject" firstname.lastname@example.org Dear Sir or Madam, I would like to tell you about how awesome the developer of Mailstrom is, and how you should totally follow his blog at http://whateverthing.com/ and perhaps even sign up for his forum-as-a-service offering at http://wtboard.com/ Sincerely, Testy Q. McTesterson ^D
Sendmail and Postfix can be a hassle, and are largely overkill for most cloud servers, so with Mailstrom you can save yourself the maintenance headaches of maintaining your own mail daemons on your multitude of servers/instances.
... this can be nothing else than the great whirlpool of the Maelström ... ... in the centre of the channel of the Maelström is an abyss penetrating the globe ... ... the ordinary accounts of this vortex had by no means prepared me for what I saw ...
Fetch from Github and install dependencies using Composer:
$> git clone git://github.com/beryllium/mailstrom mailstrom $> cd mailstrom $> curl -s https://getcomposer.org/installer | php $> ./composer.phar install
Configure it to be available in your $PATH:
$> cd /usr/local/bin $> ln -s /path/to/mailstrom/bin/mailstrom mailstrom
Or, if you wish, configure it as a drop-in replacement for the "mail" command (presuming it does not currently exist):
$> cd /usr/local/bin $> ln -s /path/to/mailstrom/bin/mailstrom mail
Mailstrom looks in /etc/mailstrom.ini and ~/.mailstrom.ini for connection settings, but you can also specify other fields (From/To/Subject/Message) in the INI file. From/To/Subject/Message values specified on the command line take precedence over the INI values.
An example Amazon SES configuration file would look like:
access_key=AAAAAKAKKAKAK secret_key=AEAET+/akakak email@example.com
Alternatively, an SMTP configuration file would specify a "type" (Amazon SES is assumed to be the default type) as well as SMTP-specific settings:
type=smtp smtp_server=mail.example.com smtp_port=25 smtp_user=username (optional) smtp_pass=pass (optional) smtp_encryption=ssl (optional. Supports ssl and tls. Omit this setting to leave encryption disabled.) firstname.lastname@example.org
Note: Some passwords with special characters may need to be quoted in the INI files, in order to prevent
parse_ini_file from throwing errors:
smtp_pass="This password is SPECIAL!!!11!"
As mentioned above, this is intended to be somewhat of a replacement for the
$> cat MyFile.txt | mailstrom --to email@example.com --subject "Output of MyFile.txt"
Or you can specify the message as a string:
$> mailstrom --to firstname.lastname@example.org --subject "Output of MyFile.txt" --message "My email message"
Note: This project is in no way related to the Mailstrom "Inbox Zero" mail client.