maui
maui copied to clipboard
Email support HTML body on Windows
Description
I would like to be able to compose mails with an HTML body, as you can do on iOS or for example using an Outlook interop MailItem (on Windows).
MAUI gives you only an Exception on Windows (EmailImplementation):
if (message != null && message.BodyFormat != EmailBodyFormat.PlainText)
throw new FeatureNotSupportedException("Windows can only compose plain text email messages.");
Public API Changes
(none to my knowledge)
Intended Use-Case
Format the body of a mail e.g. for better readability or corporate identity stuff.
I don't think we will be doing this anytime soon, so if you're dependent on this you probably want to consider implementing something yourself, either for your own project or of course contribute back to .NET MAUI so everyone can benefit. I'll leave this here for now to gauge if other people need this too.
For this one, I think MAPI still doesn't support sending HTML body. We would need to reimplement the Email support to use e.g. Outlook COM (which would require Outlook to be installed and would limit the support) or the System.Net.Mail namespace: Sending email in .NET, but the whole virtual API would need to change.