catchup
11-24-2003, 01:01 PM
I'm posting this question in hopes that someone can help me, or if they have been in a simual situation to post the script they use that worked.
This is an odd ball question, and i'm hoping some smartie pants can help me. I'm creating a site on a Windows server that has FP extensions but form submissions are not permitted, only cgi and the use of Perl. The mail server is SMTP. The CGI folder permissions are set correctly.
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:
<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 email, and nothing shows up? Why do i not get an email to my email address in the script: myEmail@company.com
???
This is an odd ball question, and i'm hoping some smartie pants can help me. I'm creating a site on a Windows server that has FP extensions but form submissions are not permitted, only cgi and the use of Perl. The mail server is SMTP. The CGI folder permissions are set correctly.
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 :
$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:
<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 email, and nothing shows up? Why do i not get an email to my email address in the script: myEmail@company.com
???