Correct Return-Path Header Format

My application uses sendmail to send outgoing email. I set the address "From:" using the following format:

Fred Dibnah <fred@dibnah.com>

I also set the Reply-To and Return-Path headers using the same format.

This seems to work in the vast majority of cases, but I saw at least one instance in which this fails, namely when the part of the name of the specified string contains a period (full stop):

Fred Dibnah, Inc. <fred@dibnah.com>

This fails deep inside the TMail code (I use Ruby), but it seems like the right thing.

My question is: should I set the Return-Path and Reply-To headers using only the email address, unlike the above Name + Email format? For example.

fred@dibnah.com

Thanks.

+3
source share
1 answer

In such a situation, it is best to contact the RFC.

When reading your question, it seems like you should never set the Return value . It is assumed that the destination destination SMTP server should set this value when the message goes to your mailbox ( http://www.faqs.org/rfcs/rfc2821.html starting with 4.4).

http://www.faqs.org/rfcs/rfc2822.html Reply-To

  • "@" (, fred@dibnah.com)
  • display-name (, )

1, , , , . 1 Reply-To :

Reply-To: fred@dibna.com
+4

Source: https://habr.com/ru/post/1709075/


All Articles