Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message priority #15

Open
ricardoboss opened this issue Apr 25, 2024 · 5 comments · May be fixed by #26
Open

Message priority #15

ricardoboss opened this issue Apr 25, 2024 · 5 comments · May be fixed by #26

Comments

@ricardoboss
Copy link
Member

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).

@chucker
Copy link
Collaborator

chucker commented Apr 26, 2024

Should this also set Importance?

@ricardoboss
Copy link
Member Author

ricardoboss commented Apr 26, 2024

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.

@chucker
Copy link
Collaborator

chucker commented Apr 26, 2024

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.

@ricardoboss
Copy link
Member Author

Sounds good.

Now how do we implement that? Should we add two properties to MailTemplateBase?

@chucker
Copy link
Collaborator

chucker commented Apr 26, 2024

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.)

@chucker chucker linked a pull request Oct 2, 2024 that will close this issue
@ricardoboss ricardoboss linked a pull request Oct 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants