发件人,发件人和返回路径有什么区别? [英] What's the difference between Sender, From and Return-Path?

查看:158
本文介绍了发件人,发件人和返回路径有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



示例:我有一个联系表单,用户可以输入他们的电子邮件,这会分配给发件人,从还是返回路径?



我在StackOverflow上快速搜索,找不到任何有用的东西。 / p>

解决方案

所以,通过SMTP提交邮件时,SMTP信封(发件人,收件人等)与实际消息的数据。



发件人标头用于在提交消息的消息中标识。这通常与 From 标题相同,这是消息来自谁。但是,在某些情况下,邮件代理人可以代表其他人发送邮件,这可能会有所不同。



返回路径头用于向收件人(或接收MTA)指示发送不送货收据。



例如,使用允许用户从网页发送邮件的服务器。所以, sender@yourcompany.com 在消息中输入并提交。服务器然后将消息发送到其收件人,并将设置为 sender@yourcompany.com 。实际的SMTP提交使用不同的凭据,例如 mailagent@mywebmail.com 。因此,发件人头设置为 mailagent@mywebmail.com ,以指示 From 标题不表示谁实际提交了该邮件。



在这种情况下,如果邮件无法发送,那么代理商可能会更好接收不送达报告,因此返回路径也将设置为 mailagent@mywebmail.com 任何送货报告都会发送给它而不是发件人。



如果你这样做,提交表单发送电子邮件,那么这可能是一个直接的并行您如何设置标题。


What's the difference between an email Sender, From and Return-Path value?

Example: I have a contact form where the user can input their email, would this be assigned to sender, from or return-path?

I had a quick search on the StackOverflow and couldn't find anything useful.

解决方案

So, over SMTP when a message is submitted, the SMTP envelope (sender, recipients, etc.) is different from the actual data of the message.

The Sender header is used to identify in the message who submitted it. This is usually the same as the From header, which is who the message is from. However, it can differ in some cases where a mail agent is sending messages on behalf of someone else.

The Return-Path header is used to indicate to the recipient (or receiving MTA) where non-delivery receipts are to be sent.

For example, take a server that allows users to send mail from a web page. So, sender@yourcompany.com types in a message and submits it. The server then sends the message to its recipient with From set to sender@yourcompany.com. The actual SMTP submission uses different credentials, something like mailagent@mywebmail.com. So, the sender header is set to mailagent@mywebmail.com, to indicate the From header doesn't indicate who actually submitted the message.

In this case, if the message cannot be sent, it's probably better for the agent to receive the non-delivery report, and so Return-Path would also be set to mailagent@mywebmail.com so that any delivery reports go to it instead of the sender.

If you are doing just that, a form submission to send e-mail, then this is probably a direct parallel with how you'd set the headers.

这篇关于发件人,发件人和返回路径有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆