Responses from the office are sent to the address "from", "do not answer",

I send emails to clients in three different places using a common email address. Any error messages / outside the office should be sent to local offices for review. Therefore, I use:

from: common@abc.com reply to: london@abc.com

from: common@abc.com reply to: newyork@abc.com

from: common@abc.com reply to: tokyo@abc.com

This is similar to working with an email error (incorrect address, etc.), but the Out of Office responses from Exchange always go to the sender address, common@abc.com. I need them to go to the local office, respond to the address.

Any idea how I can solve this? I am sending an email with C # using standard MailMessage:

MailMessage mail = new mail.Subject = mailDetail["subject"].ToString(); mail.Body = mailDetail["body"].ToString(); // From mail.From = new MailAddress(ConfigManager.GetSetting("MailSender")); // Reply to (boucebacks / out of office etc) mail.ReplyTo = new MailAddress(mailDetail["reply_to"].ToString()); mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure; 

Thanks for any help

Ryan

+4
source share
2 answers

This is for everyone who responds to mail to choose which property is most suitable for use. The reply-to property should, of course, be used if it is a real answer, but the error message cannot be considered as an answer, so the from property can be used for this in this case. As you can see, you will get different results depending on who / what is responsible and why.

The Sender property can be used to specify the actual sender as a complement to the from property. If it is handled correctly, error messages should go if the reply-to property is not used.

+5
source

This is RFC / Standard. http://tools.ietf.org/html/rfc3834

  • Where to send automatic replies (and where not to send them)

    In general, automatic replies MUST be sent to the return path field if generated after delivery. If a response is generated before delivery, the response MUST be sent back from the SMTP MAIL FROM command or (on a system other than SMTP) to the return address of the envelope, which serves as the destination for non-delivery reports.

    If the response is generated after delivery, and there is no Return-Path field in the subject message, there is an implementation or configuration error on the SMTP server that delivered the message or the gateway message outside of SMTP. A personal or group responder MUST NOT provide a response to any address other than in the Return-Path field, even if the Return-Path field is missing. Better to solve the problem with mail delivery than rely on heuristics to guess the appropriate purpose of the answer. Such heuristics are known to cause problems in the past.

    A service responder MAY deliver a response to an address from a field> From a field or to another address from a request payload if this behavior is precisely defined in the specification for this service. Service Responders MUST NOT use the Reply-to field for this purpose.

    The Reply-To field MUST NOT be used as a destination for automatic replies from personal or group responders. In general, this field is set by the sender based on his expectation

Moore Standards Tracking [Page 12]

RFC 3834 Automatic Email Answers August 2004

how human recipients will respond to the specific content of this message. For example, a sender person can use Reply-To to request responses that will be sent to the entire mailing list. Even for responses from people, there are times when it is inappropriate to respond to a Reply-to address, especially if the sender has requested that the answers are sent to the group and / or mailing list. Since the personal or the Respondent of the group works on behalf of the recipient, it is safer to assume that any Reply-to field present in the message was set by a person, based on the assumption that any response will be received from a person who had some idea of โ€‹โ€‹the role of the sender and other recipients . The answering machine does not have the necessary information to understand these roles. Sending automatic replies to answer-answer Thus, the addresses can lead to the fact that a large number of people receiving useless or unwanted messages; he can also contribute to mail circuits.

Using the From field as the destination for an automatic response is some of the same problems as using Reply-To. In particular, you can specify several addresses in the field, and automatic replies should be sent to only one address. In general, From and Response Addresses are used differently in accordance with and for this reason, personal or group Responders cannot reliably assume that the address in From or the Reply-to field is the appropriate place to respond. For these reasons, the From field MUST NOT be used as the destination for automatic replies.

Similarly, the sender field MUST NOT be used as the destination for automatic replies. This field is intended only to identify the person or organization that sent the message and does not need to contain an address valid for replies.

The Return-Path address is indeed the only message header that can be expected, as a protocol, to be suitable for automatic responses that were not expected by the sender.

+14
source

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


All Articles