Validation on From field is wrong
-
I’m glad there is validation that will help everyone out and get mail delivered, but the message on the from field “This email address does not belong to the same domain as the site.” is wrong.
According to RFC 5322:
The “From:” field 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. The “Sender:” field specifies the mailbox of the agent responsible for the actual transmission of the message. For example, if a secretary were to send a message for another person, the mailbox of the secretary would appear in the “Sender:” field and the mailbox of the actual author would appear in the “From:” field.
…
In all cases, the “From:” field SHOULD NOT contain any mailbox that does not belong to the author(s) of the message.
I would suggest adding an optional Sender header that would use the From header if the Sender header is blank. Then we can use the Sender header to add an email from our server to send from and keep the From header up to spec.
- The topic ‘Validation on From field is wrong’ is closed to new replies.