As almut and cdarke say, simply invoking the 'mail' command via Perl isn't going to do anything if your machine isn't configured to send mail using the mail command. That is, if you aren't running SendMail, Postfix, or other mail server (even if the server is relaying to another mail server), the mail isn't going to go anywhere. Perl isn't going to provide additional functionality here, because it's just a scripted method of typing a command at a command prompt.

In addition, the use of the Shell package isn't recommended for production use by its own author, so you probably don't want to use this package to run shell commands.

If you do want to send mail usin Perl, but you don't want to run your own mail server, then I recommend the use of an SMTP server so that you can configure . Your Internet Service Provider should give information on how to use one (just get the host name, if user name and password is required, if TLS/SSL is required. If that fails too, then you can use Google as an SMTP server. Once you've done that, you can use Email::Simple to create a properly formatted mail that you can send with Net::SMTP


In reply to Re: use Shell by Sinistral
in thread use Shell by sharath

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.