开发者

What's the difference between the sender and the from field in Net::IMAP::Envelope?

If you look at the doc for Net::IMAP::开发者_JAVA技巧Envelope here

http://www.ruby-doc.org/stdlib/libdoc/net/imap/rdoc/classes/Net/IMAP.html

the struct includes these two fields:

from:   Returns an array of Net::IMAP::Address that represents the from.
sender: Returns an array of Net::IMAP::Address that represents the sender.

What's the difference between these two fields, conceptually?


You're seeing fields that IMAP parsed from the email message itself. From Wikipedia's Email: Header fields:

From: The email address, and optionally the name of the author(s). In many email clients not changeable except through changing account settings.

Sender: Address of the actual sender acting on behalf of the author listed in the From: field (secretary, list manager, etc.).

There's also Reply-To which has to be considered when you want to reply to a message:

Reply-To: Address that should be used to reply to the message.

There is a bit more discussion on that page about spoofing and attempts by the MTA (server) to avoid and detect it, but the above is the gist of the info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜