I ran it past m'mann Nick 'Frat-Boy' Fratangelo and he mentioned an application he knew of called sendEmail
which apparently does the full SMTP thing and may do the job. SendEmail has been put together by a bloke called Brandon Zehm who runs a site called Caspian's Homepage
where this little script can be downloaded.
Version used: sendEmail-v1.52.tar.gz [22K]
SendEmail is written in PERL (you will need to be running PERL
) and is a great little piece of work. This version 1.52 is the result of many contributors who have gradually polished up the code. And it's really easy to use. After extracting the tarball, copy the single sendEmail
script to the /usr/local/sbin
directory, which being in the system path, is then invokable from anywhere in the directory tree, just like the native Unix sendmail
For Ubuntu and its co-distributions (Mint, etc.), run the following command to install sendEmail..
sudo apt-get install sendemail
Then all that's needed is to write a little script to send off a test mail. The sendEmail
script comes with clearly documented Usage Instructions
and examples. Here is an example of my own shell script - sms.sh
, used for sending off an SMS-email..
#Andy's Emailer using sendEmail
sendEmail -f email@example.com \
-t firstname.lastname@example.org \
-s sendmail.yoursmtpserver.com \
-xu secure_smtp_username \
-xp secure_smtp_passwd \
-u "66666 Test SMS" \
-m "This is a test SMS from your Unix Server.." \
In the above example, sendEmail
is invoked with the following parameters:
rom:) - specifies the sender's email address
o:) - destination address, in this case a mobile number at messagenet.com.au
mtp) - name of SMTP server
-xu (secure u
sername) - authorised username for secure SMTP servers
-xp (secure p
asswd) - authorised user's password for secure SMTP servers
bject) - subject line
essage) - message
Note that the subject line contains the number, 66666
. This is the password number for the messagenet service, which must be included in the subject line or message body. It is used to prevent SMS spamming and other abuse of the SMS-email system and is stripped out of the final SMS message.
Don't forget to make the original sendEmail
PERL script and your own email sending script executable
before running it..
So this system is basically the same as sending an email from Outlook and still requires the use of a bona fide SMTP Server to send the email out. I use one of my web hosting service's Mail Servers at sendmail.mallett.net
, but your ISP's Mail Server should do the job.
Although the Usage Instructions imply the -xu
switches are not normally used (listed, amusingly, under the Paranormal
section), I would suggest that most mail servers these days use secure SMTP to reduce spam and will require an authorised user's credentials to send an email. Naturally this whole system can be used to send normal emails too.
- Sign up for a free trial account with MessageNet
- Download and extract the sendEmail PERL script to /usr/local/sbin
- Create an SMS/Email script using the parameters in the Usage Instructions
- Include the MessageNet password code in the Subject line or message body
- Make sure all scripts are executable before running