Open ricardoboss opened 5 months ago
Should this also set Importance
?
~What's the difference?~
I'm not sure. Ideally we'd be able to set both individually, so the user has the flexibility to set them however they desire.
It seems from https://stackoverflow.com/a/12422845 that, technically, X-Priority
and Importance
are the ones you're looking for, and Priority
, while tangentially related (and perhaps often desired for the same reason), is technically something different.
I.e., if a message is important, we should set X-Priority
and Importance
. And if it should also be delivered quickly, we should set Priority
.
Sounds good.
Now how do we implement that? Should we add two properties to MailTemplateBase
?
Hmm. I think MailTemplateBase
should only have properties that makes sense to set from the view. Does this make sense as an API?
@{
Subject = "Greetings, @Model.Salutation!";
Importance = MailImportance.High;
Priority = MailPriority.Urgent;
}
(This also overlaps with #14 — I think we want a separate model, replacing MailMessage
, where you would set such properties.)
It would be nice to be able to send messages with an importance.
MailKit exposes two interfaces for this: https://github.com/jstedfast/MimeKit/blob/master/MimeKit/XMessagePriority.cs
and https://github.com/jstedfast/MimeKit/blob/master/MimeKit/MessagePriority.cs
I'd like to be able to use one API so it sets both of these headers (for legacy support).