简体   繁体   中英

Windows Phone 8.1 Send HTML mail from code

I'm trying to open mail application with it's content defined in code, but when i send it, gmail / oulook ... display as a plain text instead of HTML.

private async void SendEmail(string url)
{

    EmailMessage mail = new EmailMessage();
    mail.Subject = "test";
    mail.Body = string.Format("<!DOCTYPE html><html><body><image src=\"{0}\"/></body></html>", url);

    await EmailManager.ShowComposeNewEmailAsync(mail);

}

How can i force content to display as HTML instead of plain text ?

EDIT : Screenshot of avaiable properties : 在此输入图像描述

You simply cannot. Whether this is a limitation related to safety or missing functionality Windows Phone can not send HTML-formatted email, not by code or by mail client.

All you can do is use your own backend server to send html formated emails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM