Jump to content

e-mail forward script


iamnaz

Recommended Posts

Hi there, this is my first post. I'm having problems with an e-mail script.

 

This script catches info from a swf and forwards it to two different e-mail adresses.

The second part of the script works just fine, but I can't seem to get the headers to find it's way in the first <?php -string.

Instead it looks like in the attached image.

 

Does anyone have a solution to my problem?

 

Thanks in advance.

 

/Jonas

 

 

 

<?php

$sendTo = "[email protected]";
$subject = "SPA-Weekend";

$headers = "From: " . $_POST["name"] . "\r\n";

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

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

$message =  $_POST["message"] ." \n ------ \n ". $_POST["telefon"] ." \n ------ \n ". $_POST["adress"] ." \n ". $_POST["postadress"]." \n ". $_POST["nyhetsbrev"];

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

?>


<?php

$to = $_POST["email"];
//define the subject of the email
$subject = 'For the senses';
//define the message to be sent. Each line should be separated with \n
$message = "Tack för din medverkan och lycka till i tävlingen!";
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: [email protected]\r\nReply-To: [email protected]";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );

?>

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/195288-e-mail-forward-script/
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.