I'm on a windows server and the CGI folder persmission were set correctly by the ISP (so they say..) Its a SMTP mail program on the server and i'm using these scripts:
this is my form:
What happen when i submit the form i get a visual confirmation from this line of the script:
print "<h3>sending mail to $to </h3>\n";
I check my eamil, and wait to ceck it again and nothing shows up? Why do i not get an email to my email address in the script: myEmail@company.com
???
Code:
use strict;
use Net::SMTP();
my ($to, $company, $name);
use CGI();
my $cgi = new CGI();
my $smtp = Net::SMTP->new('XX.56.129.2');
##### XX is actually a number
my ($company, $name, $phone, $email, $comments);
$company = $cgi->param('company');
$name = $cgi->param('name');
$phone = $cgi->param('phone');
$email = $cgi->param('email');
$comments = $cgi->param('comments');
$to = 'myEmail@company.com';
my $message =<<EOM;
To: $to
From: server<companyEmail\@FromAddress.com>
Subject: $name filled out your contact form
$company
$name
$phone :
$email
$comments
$name filled out your form with this contact info.
EOM
;
print $cgi->header();
print $cgi->start_html();
print "<h3>sending mail to $to </h3>\n";
$smtp->mail('');
$smtp->to($to);
$smtp->data($message);
$smtp->datasend();
$smtp->dataend();
$smtp->quit();
exit;
this is my form:
Code:
<html><head></head><body>
<FORM ACTION="/cgi-bin/formmail.pl" METHOD="POST"><CENTER>
<FONT SIZE="-1" FACE="Verdana"><B>company </B><INPUT NAME="company" TYPE="text" SIZE="25"><BR>
<b>name </b><INPUT NAME="name" TYPE="text" SIZE="25"> </FONT></CENTER>
<p><font size="-1" face="Verdana"><b>phone </b><INPUT NAME="phone" TYPE="text" SIZE="25">
</font></p>
<p><CENTER>
</CENTER>
<FONT SIZE="-1" FACE="Verdana"><b>email </b><INPUT NAME="email" TYPE="text" SIZE="25">
</FONT></p>
<p><CENTER>
</CENTER>
<FONT SIZE="-1" FACE="Verdana"><b>comments </b><INPUT NAME="comments" TYPE="text" SIZE="25">
</FONT><CENTER>
</p>
<P><INPUT NAME="name" TYPE="submit" VALUE="Submit Question"></CENTER></FORM>
</body></html>
What happen when i submit the form i get a visual confirmation from this line of the script:
print "<h3>sending mail to $to </h3>\n";
I check my eamil, and wait to ceck it again and nothing shows up? Why do i not get an email to my email address in the script: myEmail@company.com
???