MailTools  2.21
About: MailTools is a set of perl modules related to mail applications.
  Fossies Dox: MailTools-2.21.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

MailTools Documentation

Some Fossies usage hints in advance:

  1. To see the Doxygen generated documentation please click on one of the items in the steelblue colored "quick index" bar above or use the side panel at the left which displays a hierarchical tree-like index structure and is adjustable in width.
  2. If you want to search for something by keyword rather than browse for it you can use the client side search facility (using Javascript and DHTML) that provides live searching, i.e. the search results are presented and adapted as you type in the Search input field at the top right.
  3. Doxygen doesn't incorporate all member files but just a definable subset (basically the main project source code files that are written in a supported language). So to search and browse all member files you may visit the Fossies MailTools-2.21.tar.gz contents page and use the Fossies standard member browsing features (also with source code highlighting and additionally with optional code folding).


MailTools is one of the oldest modules on CPAN. It started off in 1995, the year Perl 5.0 got released! That's just in the beginning of the MIME standards.

Email has become more complex over the years. The components of MailTools only understand very basic emails and fairly simple mime headers. Fixing some things will break existing applications.

The only reason for still maintaining it, is because it is used as example in many books and therefore applications still use it. Not because it is good. Sometimes it is good enough, though.

Later, this module got extended by the MIME::Entity modules to support multiparts and more smartness. But even those modules are quite limited, considering modern emails.

Please note: When you start all over, please consider Mail::Box! For a feature overview, take a look at the MailBox overview and MailBox features pages.

Development → Release

Important to know, is that I use an extension on POD to write the manuals. The "raw" unprocessed version is visible on GitHub. It will run without problems, but does not contain manual-pages.

Releases to CPAN are different: "raw" documentation gets removed from the code and translated into real POD and clean HTML. This reformatting is implemented with the OODoc distribution (A name I chose before OpenOffice existed, sorry for the confusion)

Clone from github for the "raw" version. For instance, when you want to contribute a new feature.

On github, you can find the processed version for each release. But the better source is CPAN; to get it installed simply run:

   cpan -i MailTools


When you want to contribute to this module, you do not need to provide a perfect patch... actually: it is nearly impossible to create a patch which I will merge without modification. Usually, I need to adapt the style of code and documentation to my own strict rules.

When you submit an extension, please contribute a set with

  1. code

  2. code documentation

  3. regression tests in t/

Please note: When you contribute in any way, you agree to transfer the copyrights to Mark Overmeer (you will get the honors in the code and/or ChangeLog). You also automatically agree that your contribution is released under the same license as this project: licensed as perl itself.

Graham Barr wrote most of these components, since 2001 maintained by Mark Overmeer. Copyright is with these authors.

This project is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See