There is no lack of meaninful information, just lack of knowledege on how to do it. I didn't know it had to be uploaded to a server before being sent via email.
The code is a very simple script that sends me an email with the customer information. I want to add the ability for the customer to be able to send a file.
Here is the code I have:
#!/usr/bin/perl
require "cgi-lib.pl";
&ReadParse;
$mailprog = '/usr/sbin/sendmail';
print &PrintHeader;
unless (-e $mailprog)
{
print <<"PrintTag";
<HTML><BODY>
<H3>Cannot find $mailprog.</H3>
<P>There is a typo in the mail program path.</P>
</BODY></HTML>
PrintTag
exit(0);
}
#create confirmation web page
print <<"PrintTag";
<HTML><HEAD>
<TITLE>Thanks for responding!</TITLE>
</HEAD>
<BODY BGCOLOR="white" TEXT="black">
<H2>Thank You!</H2>
<P>Thanks for filling out our form.</P>
<P>Check your e-mail for a message from us.</P>
<a href="
</body></html>
PrintTag
open (MAIL, "|$mailprog -t") ||die "Can't open mail program\n";
#customer mail is being sent to
print MAIL "To: $in{'email'}\n";
#who mail is coming from and
#replying to
print MAIL "Reply-To: $in{'empmail'}\n";
print MAIL "From: $in{'empmail'}\n";
#subject
print MAIL "Subject: Your advertising request.\n\n";
#body
print MAIL << "PrintTag";
Dear $in{'custname'}:
Thank you for writing. This e-mail
confirms that we have received your
request for advertising information. We will
contact you soon!
Sincerely yours,
Daffodil Valley Times
Staff
PrintTag
close (MAIL);
#to the company
open (MAIL, "|$mailprog -t") ||die "can't open mail program\n";
print MAIL "To: $in{'empmail'}\n";
print MAIL "Reply-To: $in{'email'}\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: Advertising.\n\n";
print MAIL << "PrintTag";
$in{'custname'}
$in{'address'}
$in{'city'} $in{'state'} $in{'zip'}
$in{'comments'}
PrintTag
close (MAIL);
Thanks!
Tig