I'm using a really neat send-a-card program which works beautifully on our hosted account on a Windows server. Or at least it works right up until I try and email the card! My host provider tells me all I need to do is specify "localhost" but I must admit I'm puzzled. Specify it where?!
Here's the relevant mailing part of the script:
sub send {
$SENDMAIL="$mailprog";
open (MAIL, "| $SENDMAIL $FORM{'mail'}"
print MAIL "Reply-to: $FORM{'replyto'}\n";
print MAIL "From: $FORM{'replyto'}\n";
print MAIL "To: $FORM{'mail'}\n";
print MAIL "Subject: You have a scotsinfo-card!\n\n";
print MAIL "========================================================\n";
print MAIL "You have a scotsinfo card from $FORM{'from'}. ($FORM{'replyto'})\n\n";
print MAIL "To see your card\n";
print MAIL "point your web browser to\n\n";
print MAIL "$postcardurl\n\n";
print MAIL "The password you will need to use to get it is $word\n\n";
print MAIL "Your card will be removed in two weeks if\n";
print MAIL "you have not retrieved it by then.\n\n";
print MAIL "Sincerely, \n\n";
print MAIL "$title\n";
print MAIL "$postcardurl\n";
close MAIL;
}
I know that this is for a UNIX system and that $mailprog points to the location of SENDMAIL in the .cfg file, but how do I modify the above to use localhost on Windows?
Any help would be greatly appreciated. Many thanks.
Dave
Here's the relevant mailing part of the script:
sub send {
$SENDMAIL="$mailprog";
open (MAIL, "| $SENDMAIL $FORM{'mail'}"
print MAIL "Reply-to: $FORM{'replyto'}\n";
print MAIL "From: $FORM{'replyto'}\n";
print MAIL "To: $FORM{'mail'}\n";
print MAIL "Subject: You have a scotsinfo-card!\n\n";
print MAIL "========================================================\n";
print MAIL "You have a scotsinfo card from $FORM{'from'}. ($FORM{'replyto'})\n\n";
print MAIL "To see your card\n";
print MAIL "point your web browser to\n\n";
print MAIL "$postcardurl\n\n";
print MAIL "The password you will need to use to get it is $word\n\n";
print MAIL "Your card will be removed in two weeks if\n";
print MAIL "you have not retrieved it by then.\n\n";
print MAIL "Sincerely, \n\n";
print MAIL "$title\n";
print MAIL "$postcardurl\n";
close MAIL;
}
I know that this is for a UNIX system and that $mailprog points to the location of SENDMAIL in the .cfg file, but how do I modify the above to use localhost on Windows?
Any help would be greatly appreciated. Many thanks.
Dave