mail2sms - convert a mail to short text

SourceForge Logo


mail2sms converts a single (large) mail to a tiny text with contents from the mail. Perfectly suitable to send as an SMS message to a GSM telephone.

This program acts as a filter and can optionally run another program and pass the filtered data into it.

This program features:

    regex search/replace, abort on regexes, conditional regex rules, conditional output, conditional whatever actually ;-), change output length, control output format, full MIME mail support (including multipart/alternative), conditional runs dependent on date/time, splitting up the output in multiple output parts and more!

This program can not actually send any SMS by itself.


5th February, 2003 Version 1.3.5. Security fix. If you use 'run' with $message in your mail2sms config, you should upgrade to 1.3.5 from any previous version. You could be facing a security problem otherwise.
13th June, 2002 Version 1.3.4. Another set of minor bugfixes.
13th Nov, 2001 Version 1.3.3. Four minor bugfixes.
6th Apr, 2001 Version 1.3.2. Two minor bugfixes.
12th Feb, 2001 Version 1.3.1. The new 'exit' keyword is introduced.
9th Feb, 2001 Version 1.3. Core dump removed, 'filter' expression added. -l now overrides 'logfile'.
19th Oct, 2000 Version 1.2.1. Added the -l switch and made the config files get parsed in a more sensible manner that makes -n work even if not as the first option! Added the man page in web version.
18th Oct, 2000 I put mail2sms 1.2 up on the web. The 1.1 really didn't work well. I'll wait a little before I announce this more than like this to give me some time to verify functionality first.
17th Oct, 2000 Released mail2sms 1.1. Made some rather major improvements in very little time, if I may say so myself. I do hope to get some feedback on the new stuff!
  Made better separate web pages for the four main documentation files. I added this news title and made a lot of general cleanups on the web pages.


Note! The abort keyword is changed, modify your config files when upgrading from 1.0 or earlier!

mail2sms 1.3.5. Released February 5, 2003. 123558 bytes.

View the CHANGES file.

Support scripts

Several people asked me for a script to use for a mail-direct-to-any-phone mail alias, so now when I rewrote one, I decided to put it here: - you better read the perl source and modify some of the defaults and addresses to suit your own environment!
Mailing list

Yes, there's a mailing list for mail2sms discussions, help and all such issues:

CVS repository

Thanks to, we also have a CVS repository from which you can get the very latest mail2sms sources, or just browse the changes with your browser. Try either one, pick what suits you.

Related Software

I feel I really must mention Smash by Björn Stenberg and me. Smash uses a client/server concept with an easy, ASCII based TCP/IP protocol (to allow easy porting of the client to any kind of platform), plugins for different operators/protocols and more. Currently supports 17 something operators! It is fully free and open, join the smash project today!

  • SMS Client by Angelo Masci.
  • SMSLink by Philippe Andersson.
  • If you need one that actually uses GSM devices, try SAMSEM by Gabor Kiss.
  • Adam Spiers' email2sms is a perl script that does some of the things mail2sms does.

Modified April 19, 2011