V
Vespasian
The first open MAIL always sends an email. The second does not. If
fact, I got a failure notice from the second one with the following
error,
<[email protected]@host428.ipowerweb.com>:
Sorry, no mailbox here by that name. (#5.1.1)
It seems the the second MAIL wants to append '@host428.ipowerweb.com'
Maybe not
Any ideas?
ves
# Code
use CGI;
my $query = new CGI;
my $content = "Thanks for your submission.\r\n";
my $email = $query->param('send_to');
$email =~ s/\@/\\\@/;
my $from = "From: ss.net 1\n";
my $to = "To: $email\n";
my $subject = "Subject: Reservation request\n\n";
my $sendmail = "/usr/sbin/sendmail -t -f \'$email\'";
my $file = "logfile.txt";
#open (LOG, ">>$file") or print "Cannot open $file: $!";
#print LOG $to,"\n";
#close(LOG);
print "Content-type: text/html\n\n";
print $sendmail,"<br>";
print $from;
print $to;
print $subject;
$|=1;
if (1) {
open (MAIL, "| /usr/sbin/sendmail -t -f
\'keepitsimple222\@yahoo.com\'") || print "Opening sendmail failed:
$!";
print MAIL "From: tester\@1testdomain.com\r\n";
print MAIL "To: keepitsimple222\@yahoo.com\r\n";
print MAIL "Subject: old code 6\r\n";
print MAIL "Hi there. This script sure works great on UNIX, doesn't
it?\r\n";
close (MAIL);
}
if(1) {
open(MAIL, "| $sendmail") || print "Opening sendmail failed: $!";
print MAIL $from;
print MAIL $to;
print MAIL $subject;
print MAIL $content;
close (MAIL);
}
print "Confirmation of your submission will be emailed to you.\n";
fact, I got a failure notice from the second one with the following
error,
<[email protected]@host428.ipowerweb.com>:
Sorry, no mailbox here by that name. (#5.1.1)
It seems the the second MAIL wants to append '@host428.ipowerweb.com'
Maybe not
Any ideas?
ves
# Code
use CGI;
my $query = new CGI;
my $content = "Thanks for your submission.\r\n";
my $email = $query->param('send_to');
$email =~ s/\@/\\\@/;
my $from = "From: ss.net 1\n";
my $to = "To: $email\n";
my $subject = "Subject: Reservation request\n\n";
my $sendmail = "/usr/sbin/sendmail -t -f \'$email\'";
my $file = "logfile.txt";
#open (LOG, ">>$file") or print "Cannot open $file: $!";
#print LOG $to,"\n";
#close(LOG);
print "Content-type: text/html\n\n";
print $sendmail,"<br>";
print $from;
print $to;
print $subject;
$|=1;
if (1) {
open (MAIL, "| /usr/sbin/sendmail -t -f
\'keepitsimple222\@yahoo.com\'") || print "Opening sendmail failed:
$!";
print MAIL "From: tester\@1testdomain.com\r\n";
print MAIL "To: keepitsimple222\@yahoo.com\r\n";
print MAIL "Subject: old code 6\r\n";
print MAIL "Hi there. This script sure works great on UNIX, doesn't
it?\r\n";
close (MAIL);
}
if(1) {
open(MAIL, "| $sendmail") || print "Opening sendmail failed: $!";
print MAIL $from;
print MAIL $to;
print MAIL $subject;
print MAIL $content;
close (MAIL);
}
print "Confirmation of your submission will be emailed to you.\n";