Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't send mail correctly using CGI script


NortheastAV

Recommended Posts

Posted

My Contact Us Page

 

There is the link to my Contact us page.

 

Feel free to look at the source. I think its something very simple. I get the email, but it arrives as an attachment (.att). This is not good. Also, the subject is always:

 

Subject: Form posted from Microsoft Internet Explorer.

 

My host has a built in formmail handler. I know the address of the formmail script.

 

Also, I have SSL capabilities. I'd like the email sent in SSL.

 

Any help would be greatly appreciated. If you need any more info, let me know.

 

Thanks in advance.

Posted

And what exactly does this have to do with osCommerce? I can't see anything to do with osCommerce anywhere on that site. If you have php on the server you are on then you can use my 'Contact Script' available from the link below.

 

Vger

Posted

Just wondering why did you decide to use CGI. When PHP is much easier and faster.

 

$ToEmail = "[email protected]";
$ToName = "Jeff";
$ToSubject = "Example Mail from SendMail Tutorial";
$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\nSenders Company: $Company\n\n
Message Sent:\n$ToComments\n\nSender Heard About Site From: $HearAbout\n";
$EmailFooter="\nThis message was sent by: $FirstName from $REMOTE_ADDR If you feel that you
recieved this e-mail by accident please contact us at www.yourSite.com";
$Message = $EmailBody.$EmailFooter;
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");

But that's just me, I hope that helps a bit. :thumbsup:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...