PDA

View Full Version : What is path for sendmail?


ET
06-14-2002, 05:06 PM
OK, I'm totally new to this Perl stuff.
I'm using a script that someone at work wrote, and it calls a Unix function called MAIL. I assume the path to call this function on FQ's server is not the same as on our server at the office... how do I call it?

Here is the pertinent code, which will need to be modified:

<snip>
sub SendMail {
my ( $nFieldCount) = 1;

if ( open (MAIL, "|/usr/lib/sendmail -t $aszParam{'emailTo'}")) {
print MAIL "From: $aszParam{'emailFrom'}\n";
print MAIL "To: $aszParam{'emailTo'}\n";
print MAIL "Subject: $aszParam{'problem'}\n\n";

print MAIL "#THIS EMAIL GENERATED BY AN ONLINE FORM SUBMISSION
<snip>

sheila
06-14-2002, 06:50 PM
Actually, the path to Sendmail is fairly standard, although it can vary.

To find the paths to binaries such as Sendmail, Perl, Python, etc... and other useful information about your account set up, go to you CNC and click on the "Server Info" link.

Your CNC is at
http://www.example.com/CNC/

except you need to replace example.com with your actual domain.

Hope this helps,

Rich
06-14-2002, 07:04 PM
The 'MAIL' part is actually a 'handle' that is defined by the script during the 'open' function.

The relevant part you need to change is this:

/usr/lib/sendmail

which is the path to sendmail. To find out what this should be, type the following from a telnet prompt:

which sendmail

and replace the above path to what is displayed.

ET
06-17-2002, 01:12 PM
Thanks everybody, I think I have it now.