Changeset 11894


Ignore:
Timestamp:
2006-05-31T14:40:20+12:00 (18 years ago)
Author:
mdewsnip
Message:

Upgraded from 0.78 to 0.79 (the current version), as 0.78 contained a bug that was annoying me.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/cpan/Mail/Sendmail.pm

    r1778 r11894  
    11package Mail::Sendmail;
    2 # Mail::Sendmail by Milivoj Ivkovic <mi@alma.ch>
     2# Mail::Sendmail by Milivoj Ivkovic <mi\x40alma.ch>
    33# see embedded POD documentation after __END__
    4 # or http://alma.ch/perl/mail.htm
     4# or http://alma.ch/perl/mail.html
    55
    66=head1 NAME
    77
    8 Mail::Sendmail v. 0.78 - Simple platform independent mailer
     8Mail::Sendmail v. 0.79 - Simple platform independent mailer
    99
    1010=cut
    1111
    12 $VERSION = '0.78';
     12$VERSION = '0.79';
    1313
    1414# *************** Configuration you may want to change *******************
     
    1818%mailcfg = (
    1919    # List of SMTP servers:
    20     'smtp'    => [],
     20    'smtp'    => [ qw( localhost ) ],
     21    #'smtp'    => [ qw( mail.mydomain.com ) ], # example
    2122
    2223    'from'    => '', # default sender e-mail, used when no From header in mail
     
    4243            @EXPORT_OK
    4344            %mailcfg
    44             $default_smtp_server
    45             $default_smtp_port
    46             $default_sender
    47             $TZ
    48             $use_MIME
    4945            $address_rx
    5046            $debug
     
    5753use Socket;
    5854use Time::Local; # for automatic time zone detection
     55use Sys::Hostname; # for use of hostname in HELO
    5956
    6057# use MIME::QuotedPrint if available and configured in %mailcfg
     
    6764                 %mailcfg
    6865                 time_to_date
    69                  $default_smtp_server
    70                  $default_smtp_port
    71                  $default_sender
    72                  $TZ
    7366                 $address_rx
    7467                 $debug
     
    8073# see pod documentation about this regex
    8174
    82 my $word_rx = '[\x21\x23-\x27\x2A-\x2B\x2D\w\x3D\x3F]+';
     75my $word_rx = '[\x21\x23-\x27\x2A-\x2B\x2D\x2F\w\x3D\x3F]+';
    8376my $user_rx = $word_rx         # valid chars
    8477             .'(?:\.' . $word_rx . ')*' # possibly more words preceded by a dot
     
    8881
    8982$address_rx = '((' . $user_rx . ')\@(' . $dom_rx . '|' . $ip_rx . '))';
    90 ; # v. 0.6
     83; # v. 0.61
    9184
    9285sub time_to_date {
     
    10194        = localtime($time);
    10295
    103     $TZ ||= $mailcfg{'tz'};
    104 
     96    my $TZ = $mailcfg{'tz'};
    10597    if ( $TZ eq "" ) {
    10698        # offset in hours
    10799        my $offset  = sprintf "%.1f", (timegm(localtime) - time) / 3600;
    108         my $minutes = sprintf "%02d", ( $offset - int($offset) ) * 60;
     100        my $minutes = sprintf "%02d", abs( $offset - int($offset) ) * 60;
    109101        $TZ  = sprintf("%+03d", int($offset)) . $minutes;
    110102    }
     
    114106                     $months[$mon],
    115107                     $year+1900,
    116                      sprintf("%02d", $hour) . ":" . sprintf("%02d", $min),
     108                     sprintf("%02d:%02d:%02d", $hour, $min, $sec),
    117109                     $TZ
    118110               );
     
    120112
    121113sub sendmail {
    122     # original sendmail 1.21 by Christian Mallwitz.
    123     # Modified and 'modulized' by [email protected]
    124114
    125115    $error = '';
    126116    $log = "Mail::Sendmail v. $VERSION - "    . scalar(localtime()) . "\n";
    127117
     118    my $CRLF = "\015\012";
     119    local $/ = $CRLF;
     120    local $\ = ''; # to protect us from outside settings
    128121    local $_;
    129     local $/ = "\015\012";
    130122
    131123    my (%mail, $k,
    132124        $smtp, $server, $port, $connected, $localhost,
    133         $message, $fromaddr, $recip, @recipients, $to, $header,
     125        $fromaddr, $recip, @recipients, $to, $header,
    134126       );
    135127
     128    # -------- a few internal subs ----------
    136129    sub fail {
    137130        # things to do before returning a sendmail failure
     
    142135    }
    143136
     137    sub socket_write {
     138        my $i;
     139        for $i (0..$#_) {
     140            # accept references, so we don't copy potentially big data
     141            my $data = ref($_[$i]) ? $_[$i] : \$_[$i];
     142            if ($mailcfg{'debug'} > 5) {
     143                if (length($$data) < 500) {
     144                    print ">", $$data;
     145                }
     146                else {
     147                    print "> [...", length($$data), " bytes sent ...]\n";
     148                }
     149            }
     150            print(S $$data) || return 0;
     151        }
     152        1;
     153    }
     154
     155    sub socket_read {
     156        my $response; # for multi-line server responses
     157        do {
     158            chomp($_ = <S>);
     159            print "<$_\n" if $mailcfg{'debug'} > 5;
     160            if (/^[45]/ or !$_) {
     161                return; # return false
     162            }
     163            $response .= $_;
     164         } while (/^[\d]+-/);
     165         return $response;
     166    }
     167    # -------- end of internal subs ----------
     168
    144169    # all config keys to lowercase, to prevent typo errors
    145170    foreach $k (keys %mailcfg) {
     
    149174    }
    150175
    151     # redo hash, arranging keys case etc...
     176    # redo mail hash, arranging keys case etc...
    152177    while (@_) {
    153         # arrange keys case
    154         $k = ucfirst lc(shift @_);
    155 
     178        $k = shift @_;
    156179        if (!$k and $^W) {
    157180            warn "Received false mail hash key: \'$k\'. Did you forget to put it in quotes?\n";
    158181        }
    159182
     183        # arrange keys case
     184        $k = ucfirst lc($k);
     185
    160186        $k =~ s/\s*:\s*$//o; # kill colon (and possible spaces) at end, we add it later.
     187        # uppercase also after "-", so people don't complain that headers case is different
     188        # than in Outlook.
     189        $k =~ s/-(.)/"-" . uc($1)/ge;
    161190        $mail{$k} = shift @_;
    162191    }
    163192
    164     $smtp = $mail{'Smtp'} || $mail{'Server'} || $default_smtp_server;
    165 #    unshift @{$mailcfg{'smtp'}}, $smtp if ($smtp and $mailcfg{'smtp'}->[0] ne $smtp);
    166     unshift @{$mailcfg{'smtp'}}, $smtp if $smtp; # Change here to avoid undefined value
    167                                                  # with our empty mailcfg{'smtp'} - Stefan
     193    $smtp = $mail{'Smtp'} || $mail{'Server'};
     194    unshift @{$mailcfg{'smtp'}}, $smtp if ($smtp and $mailcfg{'smtp'}->[0] ne $smtp);
    168195
    169196    # delete non-header keys, so we don't send them later as mail headers
     
    173200    delete $mail{'Smtp'}; delete $mail{'Server'};
    174201
    175     $mailcfg{'port'} = $mail{'Port'} || $default_smtp_port || $mailcfg{'port'} || 25;
     202    $mailcfg{'port'} = $mail{'Port'} || $mailcfg{'port'} || 25;
    176203    delete $mail{'Port'};
    177 
    178     # for backward compatibility only
    179     $mailcfg{'retries'} = $connect_retries if defined($connect_retries);
    180     $mailcfg{'delay'} = $retry_delay if defined($retry_delay);
    181204
    182205    {    # don't warn for undefined values below
    183206        local $^W = 0;
    184         $message = join("", $mail{'Message'}, $mail{'Body'}, $mail{'Text'});
    185     }
    186 
    187     # delete @mail{'Message', 'Body', 'Text'};
    188     delete $mail{'Message'}; delete $mail{'Body'}; delete $mail{'Text'};
    189 
    190     # Extract 'From:' e-mail address
    191 
    192     $fromaddr = $mail{'From'} || $default_sender || $mailcfg{'from'};
     207        $mail{'Message'} = join("", $mail{'Message'}, $mail{'Body'}, $mail{'Text'});
     208    }
     209
     210    # delete @mail{'Body', 'Text'};
     211    delete $mail{'Body'}; delete $mail{'Text'};
     212
     213    # Extract 'From:' e-mail address to use as envelope sender
     214
     215    $fromaddr = $mail{'Sender'} || $mail{'From'} || $mailcfg{'from'};
     216    delete $mail{'Sender'};
    193217    unless ($fromaddr =~ /$address_rx/) {
    194218        return fail("Bad or missing From address: \'$fromaddr\'");
     
    201225
    202226    # cleanup message, and encode if needed
    203     $message =~ s/^\./\.\./gom;     # handle . as first character
    204     $message =~ s/\r\n/\n/go;     # normalize line endings, step 1 of 2 (next step after MIME encoding)
    205 
    206     $mail{'Mime-version'} ||= '1.0';
    207     $mail{'Content-type'} ||= 'text/plain; charset="iso-8859-1"';
    208 
    209     unless ( $mail{'Content-transfer-encoding'}
    210           || $mail{'Content-type'} =~ /multipart/io )
     227    $mail{'Message'} =~ s/\r\n/\n/go;     # normalize line endings, step 1 of 2 (next step after MIME encoding)
     228
     229    $mail{'Mime-Version'} ||= '1.0';
     230    $mail{'Content-Type'} ||= 'text/plain; charset="iso-8859-1"';
     231
     232    unless ( $mail{'Content-Transfer-Encoding'}
     233          || $mail{'Content-Type'} =~ /multipart/io )
    211234    {
    212235        if ($mailcfg{'mime'}) {
    213             $mail{'Content-transfer-encoding'} = 'quoted-printable';
    214             $message = encode_qp($message);
     236            $mail{'Content-Transfer-Encoding'} = 'quoted-printable';
     237            $mail{'Message'} = encode_qp($mail{'Message'});
    215238        }
    216239        else {
    217             $mail{'Content-transfer-encoding'} = '8bit';
    218             if ($message =~ /[\x80-\xFF]/o) {
     240            $mail{'Content-Transfer-Encoding'} = '8bit';
     241            if ($mail{'Message'} =~ /[\x80-\xFF]/o) {
    219242                $error .= "MIME::QuotedPrint not present!\nSending 8bit characters, hoping it will come across OK.\n";
    220243                warn "MIME::QuotedPrint not present!\n",
    221                      "Sending 8bit characters, hoping it will come across OK.\n"
     244                     "Sending 8bit characters without encoding, hoping it will come across OK.\n"
    222245                     if $^W;
    223246            }
     
    225248    }
    226249
    227     $message =~ s/\n/\015\012/go; # normalize line endings, step 2.
     250    $mail{'Message'} =~ s/^\./\.\./gom;     # handle . as first character
     251    $mail{'Message'} =~ s/\n/$CRLF/go; # normalize line endings, step 2.
    228252
    229253    # Get recipients
     
    244268
    245269    # get local hostname for polite HELO
    246     $localhost = (gethostbyname('localhost'))[0] || 'localhost';
     270    $localhost = hostname() || 'localhost';
    247271
    248272    foreach $server ( @{$mailcfg{'smtp'}} ) {
    249273        # open socket needs to be inside this foreach loop on Linux,
    250274        # otherwise all servers fail if 1st one fails !??! why?
    251         unless ( socket S, AF_INET, SOCK_STREAM, (getprotobyname 'tcp')[2] ) {
     275        unless ( socket S, AF_INET, SOCK_STREAM, scalar(getprotobyname 'tcp') ) {
    252276            return fail("socket failed ($!)")
    253277        }
     
    257281        $server =~ s/\s+//go; # remove spaces just in case of a typo
    258282        # extract port if server name like "mail.domain.com:2525"
    259         ($server =~ s/:(.+)$//o) ? $port = $1    : $port = $mailcfg{'port'};
     283        $port = ($server =~ s/:(\d+)$//o) ? $1 : $mailcfg{'port'};
    260284        $smtp = $server; # save $server for use outside foreach loop
    261285
     
    273297            $error .= "connect to $server failed ($!)\n";
    274298            print "- connect to $server failed ($!)\n" if $mailcfg{'debug'} > 1;
    275             print "retrying in $mailcfg{'delay'} seconds...\n";
     299            print "retrying in $mailcfg{'delay'} seconds...\n" if $mailcfg{'debug'} > 1;
    276300            sleep $mailcfg{'delay'};
    277301        }
     
    303327    my($oldfh) = select(S); $| = 1; select($oldfh);
    304328
    305     chomp($_ = <S>);
    306     if (/^[45]/ or !$_) {
    307         return fail("Connection error from $smtp on port $port ($_)")
    308     }
    309 
    310     print S "HELO $localhost\015\012";
    311     chomp($_ = <S>);
    312     if (/^[45]/ or !$_) {
    313         return fail("HELO error ($_)")
    314     }
    315    
    316     print S "mail from: <$fromaddr>\015\012";
    317     chomp($_ = <S>);
    318     if (/^[45]/ or !$_) {
    319         return fail("mail From: error ($_)")
    320     }
     329    socket_read()
     330        || return fail("Connection error from $smtp on port $port ($_)");
     331    socket_write("HELO $localhost$CRLF")
     332        || return fail("send HELO error");
     333    socket_read()
     334        || return fail("HELO error ($_)");
     335    socket_write("MAIL FROM: <$fromaddr>$CRLF")
     336        || return fail("send MAIL FROM: error");
     337    socket_read()
     338        || return fail("MAIL FROM: error ($_)");
    321339
    322340    foreach $to (@recipients) {
    323         if ($debug) { print STDERR "sending to: <$to>\n"; }
    324         print S "rcpt to: <$to>\015\012";
    325         chomp($_ = <S>);
    326         if (/^[45]/ or !$_) {
    327             $log .= "!Failed: $to\n    ";
    328             return fail("Error sending to <$to> ($_)\n");
    329         }
    330         else {
    331             $log .= "$to\n    ";
    332         }
     341        socket_write("RCPT TO: <$to>$CRLF")
     342            || return fail("send RCPT TO: error");
     343        socket_read()
     344            || return fail("RCPT TO: error ($_)");
     345        $log .= "$to\n    ";
    333346    }
    334347
    335348    # start data part
    336     print S "data\015\012";
    337     chomp($_ = <S>);
    338     if (/^[45]/ or !$_) {
    339            return fail("Cannot send data ($_)");
    340     }
     349
     350    socket_write("DATA$CRLF")
     351        || return fail("send DATA error");
     352    socket_read()
     353        || return fail("DATA error ($_)");
    341354
    342355    # print headers
    343356    foreach $header (keys %mail) {
     357        next if $header eq "Message";
    344358        $mail{$header} =~ s/\s+$//o; # kill possible trailing garbage
    345         print S "$header: ", $mail{$header}, "\015\012";
     359        socket_write("$header: $mail{$header}$CRLF")
     360            || return fail("send $header: error");
    346361    };
    347362
     
    351366    #- print STDERR "trying to continue, expecting an error... \n";
    352367
    353     # send message body
    354     print S "\015\012",
    355             $message,
    356             "\015\012.\015\012";
    357 
    358     chomp($_ = <S>);
    359     if (/^[45]/ or !$_) {
    360            return fail("message transmission failed ($_)");
    361     }
     368    # send message body (passed as a reference, in case it's big)
     369    socket_write($CRLF, \$mail{'Message'}, "$CRLF.$CRLF")
     370           || return fail("send message error");
     371    socket_read()
     372        || return fail("message transmission error ($_)");
     373    $log .= "\nResult: $_";
    362374
    363375    # finish
    364     print S "quit\015\012";
    365     $_ = <S>;
     376    socket_write("QUIT$CRLF")
     377           || return fail("send QUIT error");
     378    socket_read();
    366379    close S;
    367380
     
    390403Perl 5 and a network connection.
    391404
    392 After struggling for some time with various command-line mailing programs
    393 which never did exactly what I wanted, I put together this Perl only
    394 solution.
    395 
    396405Mail::Sendmail contains mainly &sendmail, which takes a hash with the
    397406message to send and sends it. It is intended to be very easy to setup and
    398 use.
     407use. See also L<"FEATURES"> below.
    399408
    400409=head1 INSTALLATION
     
    404413=item Best
    405414
    406 perl -MCPAN -e "install Mail::Sendmail"
     415C<perl -MCPAN -e "install Mail::Sendmail">
    407416
    408417=item Traditional
     
    417426Copy Sendmail.pm to Mail/ in your Perl lib directory.
    418427
    419     (eg. c:\Perl\lib\Mail\, c:\Perl\site\lib\Mail\,
    420      /usr/lib/perl5/site_perl/Mail/, ... or whatever it
    421      is on your system)
     428    (eg. c:\Perl\site\lib\Mail\
     429     or  /usr/lib/perl5/site_perl/Mail/
     430     or whatever it is on your system.
     431     They are listed when you type C< perl -V >)
    422432
    423433=item ActivePerl's PPM
     
    425435ppm install --location=http://alma.ch/perl/ppm Mail-Sendmail
    426436
    427 But this way you don't get a chance to have a look at other files (Changes, 
    428 Todo, test.pl, ...) and PPM doesn't run the test script (test.pl).
     437But this way you don't get a chance to have a look at other files (Changes,
     438Todo, test.pl, ...).
    429439
    430440=back
    431441
    432 At the top of Sendmail.pm, set your default SMTP server, unless you specify
    433 it with each message, or want to use the default.
     442At the top of Sendmail.pm, set your default SMTP server(s), unless you specify
     443it with each message, or want to use the default (localhost).
    434444
    435445Install MIME::QuotedPrint. This is not required but strongly recommended.
     
    437447=head1 FEATURES
    438448
    439 Automatic time zone detection, Date: header, MIME quoted-printable encoding 
     449Automatic time zone detection, Date: header, MIME quoted-printable encoding
    440450(if MIME::QuotedPrint installed), all of which can be overridden.
    441451
    442 Internal Bcc: and Cc: support (even on broken servers)
    443 
    444 Allows real names in From: and To: fields
    445 
    446 Doesn't send unwanted headers, and allows you to send any header(s) you
    447 want
     452Bcc: and Cc: support.
     453
     454Allows real names in From:, To: and Cc: fields
     455
     456Doesn't send an X-Mailer: header (unless you do), and allows you to send any
     457header(s) you want.
    448458
    449459Configurable retries and use of alternate servers if your mail server is
     
    454464=head1 LIMITATIONS
    455465
    456 Doesn't work on OpenVMS.
    457 
    458466Headers are not encoded, even if they have accented characters.
    459467
    460 Since the whole message is in memory (twice!), it's not suitable for
     468No suport for the SMTP AUTH extension.
     469
     470Since the whole message is in memory, it's not suitable for
    461471sending very big attached files.
    462472
    463473The SMTP server has to be set manually in Sendmail.pm or in your script,
    464474unless you have a mail server on localhost.
     475
     476Doesn't work on OpenVMS, I was told. Cannot test this myself.
    465477
    466478=head1 CONFIGURATION
     
    482494C<$mail{smtp} = 'my.mail.server';>
    483495
    484 A future version will try to set useful defaults for you during the
    485 Makefile.PL.
     496A future version will (hopefully) try to set useful defaults for you
     497during the Makefile.PL.
    486498
    487499=item Other configuration settings
     
    509521The colon after headers is not necessary.
    510522
    511 The Body part key can be called 'Body', 'Message' or 'Text'. The SMTP
    512 server key can be called 'Smtp' or 'Server'.
     523The Body part key can be called 'Body', 'Message' or 'Text'.
     524
     525The SMTP server key can be called 'Smtp' or 'Server'. If the connection to
     526this one fails, the other ones in C<$mailcfg{smtp}> will still be tried.
    513527
    514528The following headers are added unless you specify them yourself:
    515529
    516     Mime-version: 1.0
    517     Content-type: 'text/plain; charset="iso-8859-1"'
    518 
    519     Content-transfer-encoding: quoted-printable
     530    Mime-Version: 1.0
     531    Content-Type: 'text/plain; charset="iso-8859-1"'
     532
     533    Content-Transfer-Encoding: quoted-printable
    520534    or (if MIME::QuotedPrint not installed)
    521     Content-transfer-encoding: 8bit
     535    Content-Transfer-Encoding: 8bit
    522536
    523537    Date: [string returned by time_to_date()]
     538
     539If you wish to use an envelope sender address different than the
     540From: address, set C<$mail{Sender}> in your %mail hash.
    524541
    525542The following are not exported by default, but you can still access them
    526543with their full name, or request their export on the use line like in:
    527 C<use Mail::Sendmail qw($address_rx time_to_date);>
     544C<use Mail::Sendmail qw(sendmail $address_rx time_to_date);>
    528545
    529546=head2 Mail::Sendmail::time_to_date()
     
    564581This hash contains all configuration options. You normally edit it once (if
    565582ever) in Sendmail.pm and forget about it, but you could also access it from
    566 your scripts. For readability, I'll assume you have imported it.
     583your scripts. For readability, I'll assume you have imported it
     584(with something like C<use Mail::Sendmail qw(sendmail %mailcfg)>).
    567585
    568586The keys are not case-sensitive: they are all converted to lowercase before
     
    581599default port (like in my.special.server:2525).
    582600
    583 Default: localhost. (the previous version also had smtp.site1.csi.com which
    584 was an open relay, but it isn't anymore)
     601Default: localhost.
    585602
    586603=item $mailcfg{from}
     
    647664=item $mailcfg{debug}
    648665
    649 C<$mailcfg{debug} => 0;>
    650 
    651 Prints stuff to STDERR. Not used much, and what is printed may change
    652 without notice. Don't count on it.
     666C<$mailcfg{debug} = 0;>
     667
     668Prints stuff to STDERR. Current maximum is 6, which prints the whole SMTP
     669session, except data exceeding 500 bytes.
    653670
    654671Default: 0;
     
    662679=head2 Configuration variables from previous versions
    663680
    664 The following global variables were used in version 0.74 for configuration. 
    665 They should still work, but will not in a future version (unless you
    666 complain loudly). Please use I<%mailcfg> if you need to access the
    667 configuration from your scripts.
     681The following global variables were used in version 0.74 for configuration.
     682As from version 0.78_1, they are not supported anymore.
     683Use the I<%mailcfg> hash if you need to access the configuration
     684from your scripts.
    668685
    669686=over 4
     
    682699
    683700=item $Mail::Sendmail::use_MIME
    684 
    685 This one couldn't really be used in the previous version, so I just dropped it.
    686 It is replaced by I<$mailcfg{mime}> which works.
    687701
    688702=back
     
    712726  $mail{'mESSaGE : '} = "The message key looks terrible, but works.";
    713727  # cheat on the date:
    714   $mail{Date} = Mail::Sendmail::time_to_date( time() - 86400 ),
     728  $mail{Date} = Mail::Sendmail::time_to_date( time() - 86400 );
    715729
    716730  if (sendmail %mail) { print "Mail sent OK.\n" }
     
    718732
    719733  print "\n\$Mail::Sendmail::log says:\n", $Mail::Sendmail::log;
     734 
     735Also see http://alma.ch/perl/Mail-Sendmail-FAQ.html for examples
     736of HTML mail and sending attachments.
    720737
    721738=head1 CHANGES
    722739
    723 Single-letter host names bug fixed since version 0.77. See the F<Changes> file for
    724 the full history.
     740Main changes since version 0.78:
     741
     742Added "/" (\x2F) as a valid character in mailbox part.
     743
     744Removed old configuration variables which are not used anymore
     745since version 0.74.
     746
     747Added support for different envelope sender (through C<$mail{Sender}>)
     748
     749Changed case of headers: first character after "-" also uppercased
     750
     751Support for multi-line server responses
     752
     753Localized $\ and $_
     754
     755Some internal rewrites and documentation updates
     756
     757Fixed old bug of dot as 76th character on line disappearing.
     758
     759Fixed very old bug where port number was not extracted from
     760stuff like 'my.server:2525'.
     761
     762Fixed time_to_date bug with negative half-hour zones (only Newfoundland?)
     763
     764Added seconds to date string
     765
     766Now uses Sys::Hostname to get the hostname for HELO. (This may break the
     767module on some very old Win32 Perls where Sys::Hostname was broken)
     768
     769Enable full session output for debugging
     770
     771See the F<Changes> file for the full history. If you don't have it
     772because you installed through PPM, you can also find the latest
     773one on F<http://alma.ch/perl/scripts/Sendmail/Changes>.
    725774
    726775=head1 AUTHOR
    727776
    728 Milivoj Ivkovic [email protected] or [email protected]
     777Milivoj Ivkovic <mi\x40alma.ch> ("\x40" is "@" of course)
    729778
    730779=head1 NOTES
    731780
    732 MIME::QuotedPrint is used by default on every message if available. It 
    733 allows reliable sending of accented characters, and also takes care of 
    734 too long lines (which can happen in HTML mails). It is available in the 
    735 MIME-Base64 package at http://www.perl.com/CPAN/modules/by-module/MIME/ or 
     781MIME::QuotedPrint is used by default on every message if available. It
     782allows reliable sending of accented characters, and also takes care of
     783too long lines (which can happen in HTML mails). It is available in the
     784MIME-Base64 package at http://www.perl.com/CPAN/modules/by-module/MIME/ or
    736785through PPM.
    737786
    738 Look at http://alma.ch/perl/Mail-Sendmail-FAQ.htm for additional info
    739 (CGI, examples of sending attachments, HTML mail etc...)
    740 
    741 You can use it freely. (Someone complained this is too vague. So, more
    742 precisely: do whatever you want with it, but be warned that terrible things
    743 will happen to you if you use it badly, like for sending spam, claiming you
    744 wrote it alone, or ...?)
    745 
    746 I would appreciate a short (or long) e-mail note if you use this (and even
    747 if you don't, especially if you care to say why). And of course,
    748 bug-reports and/or suggestions are welcome.
    749 
    750 Last revision: 25.09.2000. Latest version should be available at
    751 http://alma.ch/perl/mail.htm , and a few days later on CPAN.
     787Look at http://alma.ch/perl/Mail-Sendmail-FAQ.html for additional
     788info (CGI, examples of sending attachments, HTML mail etc...)
     789
     790You can use this module freely. (Someone complained this is too vague.
     791So, more precisely: do whatever you want with it, but be warned that
     792terrible things will happen to you if you use it badly, like for sending
     793spam, or ...?)
     794
     795Thanks to the many users who sent me feedback, bug reports, suggestions, etc.
     796And please excuse me if I forgot to answer your mail. I am not always reliabe
     797in answering mail. I intend to set up a mailing list soon.
     798
     799Last revision: 06.02.2003. Latest version should be available on
     800CPAN: F<http://www.cpan.org/modules/by-authors/id/M/MI/MIVKOVIC/>.
    752801
    753802=cut
Note: See TracChangeset for help on using the changeset viewer.