Guest_imported
New member
- Jan 1, 1970
- 0
I am using a postcard script that uses sendmail to send an email to notify of the postcard.
The follow peice of code:
open (MAIL, "|$mailprog $input{'address'}"
|| die "Can't open $mailprog!\n";
print MAIL "Reply-to: $input{'senderemail'}\n";
print MAIL "From: $input{'senderemail'}\n";
print MAIL "To: $input{'address'}\n";
print MAIL "Subject: $subject\n\n";
open (PAGE, "$mail_message"
|| die ("I am sorry, but I was unable to open the file
$thank_you."
;
while (<PAGE>) {
s/%%sender%%/$input{'sender'}/g;
s/%%userid%%/$userid/g;
print MAIL $_;
}
close (PAGE);
close (MAIL);
In the above, $mailprog is path to sendmail, $input{'address') and $mail_message is a template email.
The script sends out two identical emails.
any ideas.
Ric
The follow peice of code:
open (MAIL, "|$mailprog $input{'address'}"
print MAIL "Reply-to: $input{'senderemail'}\n";
print MAIL "From: $input{'senderemail'}\n";
print MAIL "To: $input{'address'}\n";
print MAIL "Subject: $subject\n\n";
open (PAGE, "$mail_message"
$thank_you."
while (<PAGE>) {
s/%%sender%%/$input{'sender'}/g;
s/%%userid%%/$userid/g;
print MAIL $_;
}
close (PAGE);
close (MAIL);
In the above, $mailprog is path to sendmail, $input{'address') and $mail_message is a template email.
The script sends out two identical emails.
any ideas.
Ric