Jump to content

PHP Sendmail Script help.


jared2501

Recommended Posts

Hey Guys,

 

This is my first post here, as you can see, and I don't know a thing about it. I have recently been trying to set up a buy now page in which you input some information and it is sen to an email address. The data I wish to send is extracted from a .swf file using the post file. It comes from dynamic text fields. when I hit the send button it gets the info from the text fields with the names of:

sender_name

sender_email

sender_address

sender_address2

sender_city

sender_comment

sender_product

 

The flash movie (once all these fields are filled out) calls sendmail.php. Sendmail.php contains the following code:

 

<?php

$sendTo = "[email protected]";

$subject =  $_POST["sender_product"];

$headers = "From: " . $_POST["sender_name"] ." <" . $_POST["sender_email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["sender_email"] . "\r\n";

$headers .= "Return-path: " . $_POST["sender_email"];

$message = .$_POST["sender_address"]." ".$_POST["sender_address2"]." ".$_POST["sender_city"]." ".$_POST["sender_comment"].";

mail($sendTo, $subject, $message, $headers);

?>

 

However, when I hit the button on the movie, an email is not sent to [email protected]. I was wondering if this is because I have made an error in my php script. If so would you please help me out. I would be very thankful! :)

 

Jared

Link to comment
https://forums.phpfreaks.com/topic/44760-php-sendmail-script-help/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.