MailTools

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

	  in Mail::Header.pm

	- [Bo Adler] and [Iosif Fettich] Found that I removed a blank
	  before 'sub smtpsend' which caused AutoSplit to misbehave.

version 1.43: Fri Feb  8 09:43:25 CET 2002

	- [Jason Burnett] Added debug option for Net::SMTP for
	  Mail::Mail::smtp.

	- [Slavan Rezic] + [Jonathan Stowe] Added eval around getpwuid,
	  to avoid croak on Windows.

	- [Slavan Rezic] minor doc update.  The documentation is
	  still poor.

	- A lot of people complaint (and that after so many years that the
	  module is active) about folder lines within words or strings.
	  The mistake in the original implementation was that it tried to
	  fold too hard; folding is a service, but no requirement.
	  So: that overly active folding is removed now.

lib/Mail/Internet.pm  view on Meta::CPAN

{   my $head = shift->head->dup;

    $head->delete('From '); # Just in case :-)

    # An original message should not have any Received lines
    $head->delete('Received');

    $head->replace('X-Mailer', "Perl5 Mail::Internet v".$Mail::Internet::VERSION)
        unless $head->count('X-Mailer');

    my $name = eval {local $SIG{__DIE__}; (getpwuid($>))[6]} || $ENV{NAME} ||"";

    while($name =~ s/\([^\(\)]*\)//) { 1; }

    if($name =~ /[^\w\s]/)
    {   $name =~ s/"/\"/g;
	$name = '"' . $name . '"';
    }

    my $from = sprintf "%s <%s>", $name, mailaddress();
    $from =~ s/\s{2,}/ /g;

lib/Mail/Util.pm  view on Meta::CPAN

    $mailaddress = $ENV{MAILADDRESS};

    unless($mailaddress || $^O ne 'MacOS')
    {   require Mac::InternetConfig;

        no strict;
	Mac::InternetConfig->import;
	$mailaddress = $InternetConfig{kICEmail()};
    }

    $mailaddress ||= $ENV{USER} || $ENV{LOGNAME} || eval {getpwuid $>}
                 ||  "postmaster";

    # Add domain if it does not exist
    $mailaddress .= '@' . maildomain
	if $mailaddress !~ /\@/;

    $mailaddress =~ s/(^.*<|>.*$)//g;
    $mailaddress;
}



( run in 0.294 second using v1.01-cache-2.11-cpan-8d75d55dd25 )