I've had a situation similar to this, where I have not wanted to have to depend on (guessing) the path location of sendmail on a remote box. To solve this, I opted for the usage of Mail::Mailer (in conjunction with Net::SMTP). This combination allowed me to make use of existing mail infrastructure in place in the remote location and saved me having to fumble my way through finding the local installation of sendmail (if indeed it did exist - I still don't know).
 
The equivalent code to that posted using Mail::Mailer and Net::SMTP would be:
my ($smtp) = Mail::Mailer->new("smtp", Server => "127.0.0.1"); $smtp->open({ 'To' => $emailaddress2, 'From' => $emailaddress, 'Subject' => "subjectmatter", 'Content-Type' => "text/plain", }); print $smtp "bodytext\n\n"; $smtp->close;
Make sure of course to replace the IP address 127.0.0.1 with that of your ISP's mail server - Also too, it may be worthwhile, particularly in the early stages of project rollout, to include a 'Cc' => $emailaddress line in the hash passed to Mail::Mailer so that you can confirm delivery of mail to your client.
 
Good luck!
 

 
Ooohhh, Rob no beer function well without!

In reply to Re: Sendmail in a Blackbox by rob_au
in thread Sendmail in a Blackbox by Valkerri

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.