OS Manuals

Mail::Util(3pm)

Mail::Util(3) User Contributed Perl Documentation Mail::Util(3)

Mail::Util - mail utility functions

  use Mail::Util qw( ... );

This package provides several mail related utility functions. Any function required must by explicitly listed on the use line to be exported into the calling package.

WARNING: This method does not quote lines which accidentally also start with the message separator "From", so this implementation can be considered broken. See Mail::Box::Mbox

WARNING: On modern machines, there is only one good way to provide information to this method: the first; always explicitly configure the MAILDOMAIN.

 # everywhere else
 use Mail::Util 'maildomain';
 print maildomain;

WARNING: When not supplied via the environment variable, <mailaddress> looks at various configuration files and other environmental data. Although this seems to be smart behavior, this is not predictable enough (IMHO) to be used. Please set the MAILADDRESS explicitly, and do not trust on the "automatic detection", even when that produces a correct address (on the moment)

 # everywhere else
 use Mail::Util 'mailaddress';
 print mailaddress;
 # since v2.10
 mailaddress "me@example.com";

Hey! The above document had some coding errors, which are explained below:

Unknown directive: =chapter
Unknown directive: =chapter
Unknown directive: =chapter
Unknown directive: =chapter
Unknown directive: =function
Deleting unknown formatting code M<>
Unknown directive: =function
Unknown directive: =example
Unknown directive: =function
Unknown directive: =example
2026-10-26 perl v5.44.0

perl-mailtools 2.22-r5 · os · ingested 2026-10-27