maui icon indicating copy to clipboard operation
maui copied to clipboard

Email support HTML body on Windows

Open formerlymisterhenson opened this issue 1 year ago • 2 comments
trafficstars

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.

formerlymisterhenson avatar Aug 01 '24 18:08 formerlymisterhenson

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.

jfversluis avatar Aug 02 '24 11:08 jfversluis

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.

morning4coffe-dev avatar Jul 31 '25 08:07 morning4coffe-dev