A
Antony
Hi,
I found this perl script on a website regarding sending emails.
#!/usr/bin/perl
use CGI;
my $query = new CGI;
my $sendmail = "/usr/sbin/sendmail -t";
my $reply_to = "Reply-to: (e-mail address removed)";
my $subject = "Subject: Confirmation of your submission";
my $content = "Thanks for your submission.";
my $to = (e-mail address removed);
runmeail {
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
print SENDMAIL $reply_to;
print SENDMAIL $subject;
print SENDMAIL $to;
print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL $content;
close(SENDMAIL);
}
print $query->header;
print "Confirmation of your submission will be emailed to you.";
However when I go and run the script from the browser, I don't recieve any
emails. Is this because the script must be posted too, or have I simply
missed something out? My aim is to incorporate it into a larger script which
processes an email automatically, however this part is obviously not
working.
thanks
Antony
www.cdtoday.co.uk
I found this perl script on a website regarding sending emails.
#!/usr/bin/perl
use CGI;
my $query = new CGI;
my $sendmail = "/usr/sbin/sendmail -t";
my $reply_to = "Reply-to: (e-mail address removed)";
my $subject = "Subject: Confirmation of your submission";
my $content = "Thanks for your submission.";
my $to = (e-mail address removed);
runmeail {
open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!";
print SENDMAIL $reply_to;
print SENDMAIL $subject;
print SENDMAIL $to;
print SENDMAIL "Content-type: text/plain\n\n";
print SENDMAIL $content;
close(SENDMAIL);
}
print $query->header;
print "Confirmation of your submission will be emailed to you.";
However when I go and run the script from the browser, I don't recieve any
emails. Is this because the script must be posted too, or have I simply
missed something out? My aim is to incorporate it into a larger script which
processes an email automatically, however this part is obviously not
working.
thanks
Antony
www.cdtoday.co.uk