PDA

View Full Version : Perl Mail Script help PLEASE!!!


zones
05-22-2003, 09:52 AM
I am running IIS web server this is the mail script i am useing :

#!c:/bin/perl/perl


use Net::SMTP;

$smtp = Net::SMTP->new('SMTP.btclick.com');

$smtp->data();
$smtp->datasend("To: simon_maskell\@bcl.co.uk, jane_isted\@bcl.co.uk\n");
$smtp->datasend("Subject: Web Questions\n");
$smtp->datasend("\n");
$smtp->datasend("the message\n");
$smtp->dataend();

$smtp->quit;

print "Content-type: text/html\n\n";
print "Thanks for your time!\n";
print "<li><a href=\"$ENV{'HTTP_REFERER'}\">Back to the Form</a>\n";

With this HTML string on the FORM / Site :
<FORM METHOD=POST ACTION="/cgi-bin/qamail.pl">

The page seems to submit ok and goto the thank you page but i do no get any emails from the site!

ANy ideas, I check both my web host and bt and they say everything should be fine.

Thanks for help anyone !

ACJavascript
05-25-2003, 05:06 PM
mabye instead of this

$smtp = Net::SMTP->new('SMTP.btclick.com');

$smtp->data();
$smtp->datasend("To: simon_maskell\@bcl.co.uk, jane_isted\@bcl.co.uk\n");
$smtp->datasend("Subject: Web Questions\n");
$smtp->datasend("\n");
$smtp->datasend("the message\n");
$smtp->dataend();


try this

$smtp = Net::SMTP->new('SMTP.btclick.com');

$smtp->to ("simon_maskell\@bcl.co.uk, jane_isted\@bcl.co.uk");
$smtp->subject ("Web Questions");
$smtp->Data ("the message");

$smpt->quit;


Test test test,, hehehe gotta always try things :D