SMTPstoat is a command line SMTP mailer application that sends out e-mails according to various specifications.
There are plenty of apps that include the name ‘weasel’ and ‘ferret’, so I decided that stoat shouldn’t be left out.
- Create and send an entire e-mail via the command line.
- Send an e-mail via settings in a configuration file.
- Forward out a raw e-mail message file.
- Send attachments.
- SMTP authentication support (AUTH LOGIN).
- Send to multiple addresses.
License: GNU General Public License (GPL)
Programming Language: C++
|smtpstoat-1.0.104.linux.tar||262,646b||1.0.104||May 03, 2006|
|smtpstoat-1.0.104.win32||234,689b||1.0.104||May 03, 2006|
|smtpstoat-1.0.104.tar||151,737b||1.0.104||May 03, 2006|
Note: SMTPstoat compiles for Win32 and Linux platforms.
Sending an e-mail
[user@localhost]$ smtpstoat -w /home/user/stoat/ -S smtp.isp.net -f firstname.lastname@example.org -t “email@example.com, firstname.lastname@example.org” -s “This is a test” -m “Sending data.tar.gz” -a /home/user/data.tar.gz -v
SMTPstoat needs to know what directory it can use for creating e-mail files. This is specified by the “-w” parameter:
-w (working directory)
Note: You must specify the full directory path, but it is not necessary to add the path separator to the end “/”.
Send mail via command line parameters only
If no config file is specified, you must set the following arguments at the command line:
-S (server name)
-t (“to@address[, to@addressN]”)
-f (from address)
To create your own e-mail, use the following parameters:
-s (“subject text here”)
The following are optional arguments:
-m (“message text here”)
-M (path/to/message/text/file) (use file contents for message)
-P (port) (default = 25)
-h (helo domain) (default = localhost)
-A (username:pass) (use SMTP authentication – AUTH LOGIN)
-a (attachment)[( attachmentN)] (specify as many attachments as you like)
-v enables verbose mode (default = off)
Sending mail via a config file
You can specify a config file, and any attachments as so…
-c (config file)
smtpstoat -w (working directory) -c (config file) [-a (attachment) [(attachmentN)]]
The config file should be set out as follows:
This is the subject
Text typed here is used as the message text.
You can enter as much as you like.
Sending a raw e-mail file
You can specify that a raw message file is to be sent as so…
You can specify a config file, and a raw e-mail file to send:
smtpstoat -w (working directory) -c (config file) -r (path/to/msg/file)
Or specify the required parameters, and a raw e-mail file:
smtpstoat -w (working directory) -S (smtp server) -f (from address) -t (“to address(es)”) -r (path/to/msg/file)
The e-mail file itself should be constructed according to the RFC requirements, ending with CRLF.CRLF