[英]How to send an email on behalf of someone else from a different domain
I am building an e-commerce website (let's call it e-buy.com).我正在建立一个电子商务网站(我们称之为 e-buy.com)。 What I want is a mailing system where buyer can send an email to seller... so for example, I would have to send an email like this:
我想要的是一个邮件系统,买家可以向卖家发送 email ......所以例如,我必须像这样发送 email:
from: buyer1@yahoo.com
to: seller1@gmail.com
subject: buyer inquiry via e-buy.com
I have built the above solution, but sometimes my emails are not delivered... the reason (as far as I know) is that I am sending an email from: e-buy.com
domain but the sender is from a different domain: buyer1@yahoo.com
我已经构建了上述解决方案,但有时我的电子邮件没有送达......原因(据我所知)是我发送 email 来自:
e-buy.com
域,但发件人来自不同的域: buyer1@yahoo.com
Question 1> Is this a bad practice to set the from field to a domain different from the mail server's domain?问题 1>将 from 字段设置为与邮件服务器域不同的域是一种不好的做法吗?
I have seen some websites implement the following solution in the same situation:我已经看到一些网站在相同的情况下实现了以下解决方案:
from: mailer@e-buy.com
to: seller1@gmail.com
subject: buyer inquiry via e-buy.com e-commerce
So email is coming from: mailer@e-buy.com
, but when the seller clicks on reply button, the reply automatically changes from mailer@e-buy.com
to buyer1@yahoo.com
So email is coming from:
mailer@e-buy.com
, but when the seller clicks on reply button, the reply automatically changes from mailer@e-buy.com
to buyer1@yahoo.com
Question 2> How can this switching of sender's email be implemented?问题2>发送方email的这种切换如何实现?
Answer 1: When sending emails from another domain - you need to keep in mind that they will need to setup DNS records to list your mail server / sender as a legitimate email sender, seeming as you'll most likely have multiple big brand domains (gmail, yahoo, hotmail, etc), this approach is most likely not what you want.答案 1:从另一个域发送电子邮件时 - 您需要记住,他们需要设置 DNS 记录以将您的邮件服务器/发件人列为合法的 email 发件人,看起来您很可能拥有多个大品牌域( gmail、yahoo、hotmail 等),这种方法很可能不是您想要的。
Answer 2: This is more realistic and quite easy to implement.答案 2:这更现实,也很容易实现。 What you're looking for is a
reply-to
header.您正在寻找的是
reply-to
。 This will specify what email users should be sending to when they try to reply to an email.这将指定 email 用户在尝试回复 email 时应发送到的内容。
Explained further here . 在这里进一步解释。
When you send an email to a subscriber and they click 'Reply', the reply message is typically sent to the email address listed in the From: header.
当您向订阅者发送 email 并且他们单击“回复”时,回复消息通常会发送到“发件人”中列出的 email 地址:header。
A Reply-To address is identified by inserting the Reply-To header in your email.
通过在 email 中插入回复 header 来识别回复地址。 It is the email address that the reply message is sent when you want the reply to go to an email address that is different than the From: address.
当您希望将 go 回复到不同于 From: 地址的 email 地址时,发送回复消息的是 email 地址。
In the example below, 'service@sampledomain.com' is the Reply-To address.
在下面的示例中,“service@sampledomain.com”是回复地址。 When a subscriber clicks 'Reply', the reply message is sent to 'service@sampledomain.com' instead of 'marketing@sampledomain.com'.
当订阅者单击“回复”时,回复消息将发送到“service@sampledomain.com”而不是“marketing@sampledomain.com”。
From: marketing@sampledomain.com
来自:marketing@sampledomain.com
to: aaasample@zzzexample.com
至:aaasample@zzzexample.com
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.