Tôi đang cố gắng thêm thư trả lời để gửi tới địa chỉ thư của tôi và nó chỉ đặt từ "tôi" và trả lời địa chỉ của tôi.phpmailer không thể thêm thư trả lời vào địa chỉ
Bất kỳ ý tưởng nào tôi đang làm sai? Tôi đã thêm $ mail-> AddReplyTo. Tôi muốn nó trả lời người gửi mẫu web.
$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 = "[email protected]"; // GMAIL username
$mail->Password = "xxxxx";
$mail->AddReplyTo($email, $name);
$address = "xxxx.net";
$mail->AddAddress($address, "Contact form");
$mail->Subject = " Contact Form";
cảm ơn Brad, đã tiết kiệm rất nhiều thời gian cho tôi, Hãy nghĩ bạn đúng về gmail trả lời. Nghĩ rằng anh ta sẽ phải sống với nó. – Roscoeh