3 ms·
It depends on whether you want to follow RFCs or not. Particularly, RFC 4021 [1] states that: Header Field: From Specifies the author(s) of the messag
by kilburn 10y ago
It depends on whether you want to follow RFCs or not. Particularly, RFC 4021 [1] states that:
Header Field: From
Specifies the author(s) of the message; that is, the mailbox(es)
of the person(s) or system(s) responsible for the writing of the
message. Defined as standard by RFC 822.
Header Field: Sender
Specifies the mailbox of the agent responsible for the actual
transmission of the message. Defined as standard by RFC 822.
As far as I understand, this means that yes, you should set the From address to the user's email when sending content submitted by that user. In contrast, you should never set the Sender address to any user's email.
Another discussion is whether this is sensible or not, how well it works delivery-wise, etc... In any case, it is not as clear-cut as you make it seem.
[1] https://tools.ietf.org/html/rfc4021#section-2.1.2 https://tools.ietf.org/html/rfc4021#section-2.1.2