It's basic, it's fast, it's portable, and you don't have to worry about installing a whole module to send a message.
 

I strongly disagree with this - This approach is by far not portable as it depends on a number of factors:

Furthermore, as for the ease of using this approach without installing modules, the Net::SMTP module is included as part of the core Perl installation and as such should be available on all installations. Additionally the use of this module is very straight-forward, for example,

my $smtp = Net::SMTP->new('mail.mydomain.com'); $smtp->mail($fromaddr); $smtp->to($to); $smtp->data(); $smtp->data("Subject: $subject\n\n"); $smtp->data($message); $smtp->dataend(); $smtp->quit;

Furthermore, the use of the local network SMTP server will make your network administrator happier as it is at this point that network mail policies and statistics reporting is often based.

 


In reply to Re: Re: Email Modules by rob_au
in thread Email Modules by cjf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.