Skip to content

Commit

Permalink
Update HeaderId to clarify the difference between Autosubmitted and A…
Browse files Browse the repository at this point in the history
…uto-Submitted

This was totally confusing for me why there are two header IDs in MimeKit with the quite very same header. I even suspected a bug or that it is just a legacy API-compatibility thing (one being deprecated, though not stated?).

After some research it turns out, the header is actually defined.
At least for the modern RFC3834 header the keywords are actually also defined by IANA: https://www.iana.org/assignments/auto-submitted-keywords/auto-submitted-keywords.xml (But you don't do mapping to an enum, so introducing this would change the API drastically and be a different/bigger task, so I thought for the code this may not be relevant.)

So to clarify this and ease searching around the web and decrease potential confusion for other developers, IMHO, it is a good idea to just directly point out the basic difference in the (code) doc, directly where you are using it.

For background, I am at #938 (comment) here detecting auto-reply mails for which this header is very important.
  • Loading branch information
rklec authored Oct 2, 2024
1 parent 07c635c commit ab6881a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MimeKit/HeaderId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,18 @@ public enum HeaderId {
/// <summary>
/// The Auto-Submitted header field.
/// </summary>
/// <remarks>
/// The header as defined in <see href="https://www.rfc-editor.org/rfc/rfc3834">RFC3834</see>
/// </remarks>
AutoSubmitted,

/// <summary>
/// The Autosubmitted header field.
/// </summary>
/// <remarks>
/// <b>Important:</b> This is more a legacy header as defined in <see href="https://datatracker.ietf.org/doc/html/rfc2156"/>RFC2156</see>. <br>

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'

Check warning on line 133 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'see' does not match the start tag 'remarks'.'
/// Usually, you likely want to use <see cref="AutoSubmitted"/> instead.
/// </remarks>

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Release)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'

Check warning on line 135 in MimeKit/HeaderId.cs

View workflow job for this annotation

GitHub Actions / ci (windows-latest, Debug)

XML comment has badly formed XML -- 'End tag 'remarks' does not match the start tag 'br'.'
Autosubmitted,

/// <summary>
Expand Down

0 comments on commit ab6881a

Please sign in to comment.