Skip to content

Commit 1489237

Browse files
rklecjstedfast
andauthored
Updated FAQ to clarify/add the recommendation to set AutoSubmitted if needed (#1821)
--------- Co-authored-by: Jeffrey Stedfast <[email protected]>
1 parent 2a42387 commit 1489237

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

FAQ.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,8 @@ the same way you'd create any other message. There are only a few slight differe
11241124
3. You will want to copy the original message's `References` header into the reply message's
11251125
`References` header and then append the original message's `Message-Id` header.
11261126
4. You will probably want to "quote" the original message's text in the reply.
1127+
5. If you are generating an automatic reply, you should also follow [RFC3834](https://www.rfc-editor.org/rfc/rfc3834)
1128+
and set the `Auto-Submitted` value to `auto-replied`.
11271129

11281130
If this logic were to be expressed in code, it might look something like this:
11291131

@@ -1163,6 +1165,9 @@ public static MimeMessage Reply (MimeMessage message, MailboxAddress from, bool
11631165
reply.References.Add (message.MessageId);
11641166
}
11651167

1168+
// if this is an automatic reply, be sure to specify this using the Auto-Submitted header in order to avoid (infinite) mail loops
1169+
reply.Headers.Add (HeaderId.AutoSubmitted, "auto-replied");
1170+
11661171
// quote the original message text
11671172
using (var quoted = new StringWriter ()) {
11681173
var sender = message.Sender ?? message.From.Mailboxes.FirstOrDefault ();

0 commit comments

Comments
 (0)