phpmailer может ' t добавить ответ на адрес

Я пытаюсь добавить ответ на адрес моей почтовой программе php, и он просто отправляет от "меня" и отвечает на мой адрес.

Есть идеи, что я делаю неправильно? Я добавил $ mail-> AddReplyTo. Я хочу, чтобы он ответил отправителю веб-формы.

$name = $_POST['name'];
$telephone = $_POST['telephone'];
$email = $_POST['email'];
$message = $_POST['message'];

$body             = file_get_contents('phpmailer/contents.html');
$body             = eregi_replace("[\]",'',$body);
$body             = eregi_replace("<name>", $name,$body);
$body             = eregi_replace("<telephone>", $telephone, $body);
$body             = eregi_replace("<email>", $email, $body);
$body             = eregi_replace("<message>", $message, $body);




$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "smtp.gmail.com"; // SMTP server
                    // enables SMTP debug information (for testing)
                                           // 1 = errors and messages
                                           // 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "smtp.gmail.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;                   // set the SMTP port for the GMAIL server
$mail->Username   = "xxx@xxx.net";  // GMAIL username
$mail->Password   = "xxxxx"; 

$mail->AddReplyTo($email, $name);


$address = "xxxx.net";

$mail->AddAddress($address, "Contact form");

$mail->Subject    = " Contact Form";
7
задан Wim Coenen 27 March 2011 в 20:10
поделиться