发送邮件到我的收件箱但回复用户
我有一个联系我们的表格,用户可以在其中输入他的姓名、电子邮件地址和问题。
用户输入他的姓名、电子邮件地址和问题。问题被发送到我的收件箱,然后当我点击邮件时从我的收件箱回复,我应该能够回复用户插入的电子邮件,
电子邮件客户端是 gmail,
不起作用,
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "xxxxxxxxxxxxxxxxx";
$mail->AddAddress("[email protected]",$Username);
$mail->AddReplyTo($UserEmailAddress,$Username);
$mail->IsHTML(true);
$mail->Subject = "From ContactUs Form:".$Username;
使用下面的代码,它 邮件正在进入我的收件箱,但当我按回复时,它正在回复我的收件箱本身
I have a contact us form, whereby the user enters his name,email address and question.
The user enters his name, email address and the question. The question is sent to my inbox and then from my inbox when i click on the mail, reply, i should be able to reply to the email which the user inserted,
Email client is gmail
using the code below, it is not working,
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "xxxxxxxxxxxxxxxxx";
$mail->AddAddress("[email protected]",$Username);
$mail->AddReplyTo($UserEmailAddress,$Username);
$mail->IsHTML(true);
$mail->Subject = "From ContactUs Form:".$Username;
the mail is comming into my inbox but when I'm pressing reply, it is replying to my inbox itself
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您使用哪个电子邮件客户端?
应该是
设置 From 和 FromName 也是可取的。如果您没有自己设置,则会从 php.ini 中提取默认域,该默认域要么是默认域,要么可能是您自己以外的域!
戴夫
Which email client are you using?
should be
Setting a From and FromName would also be advisable. If you don't set one yourself a default is pulled from php.ini which will either be a default domain or could be a domain other than your own!
Dave
这是 Gmail 中的一个已知“错误”:
http ://www.google.com/support/forum/p/gmail/thread?tid=4641785bf01dbd9a&hl=en
只要您自己的电子邮件地址是发件人地址 Gmail 似乎不支持回复标头。
This is a known "bug" in Gmail:
http://www.google.com/support/forum/p/gmail/thread?tid=4641785bf01dbd9a&hl=en
As long as your own email address is the From-address Gmail seems to not honor the Reply-To headers.
您的 SMTP 服务器是否可能不允许使用不同的起始标头和回复标头?
您应该检查收到的电子邮件的标题,如果回复确实设置为应有的内容,也许可以考虑将发件人地址设置为回复地址。这绝对应该解决问题。
编辑:
Gmail 可能是这里的问题。
一方面,它或多或少地忽略了回复标头,因为它似乎是这样,并且如果“收件人”地址也在“发送邮件为...”设置中,则似乎存在问题。
Google 支持论坛
Is it possible that your SMTP server doesn't allow for different from and reply-to headers?
You should check the headers of the email that you get if reply-to is really set to what it should be and maybe consider setting the from address to the reply-to address. That should definitly solve the problem.
Edit:
Gmail might be the problem here.
For one it does more or less ignore the reply-to header as it seems and there seems to be an issue if the To address is also in the 'Send Mail As...' settings.
Google Support Forum