in reply to Sendmail in a Blackbox

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!