cjlotz / Xamarin.Plugins

Cross platform Xamarin Plugins
MIT License
113 stars 56 forks source link

Is it possible to use HTML Table tag inside BodyAsHtml on iOS/Android #29

Closed lknstanley closed 8 years ago

lknstanley commented 8 years ago
    public void SendForm(string to, string subject, List<string> data, string cc, List<string> bcc, List<string> filePath) {
        var emailTask = MessagingPlugin.EmailMessenger;
        var email = new EmailMessageBuilder ();

        email.To (to);
        email.Subject (subject);
        email.BodyAsHtml ("<table><tr><td>T1</td><td>T2</td></tr><tr><td>T3</td><td>T4</td></tr><tr><td>T5</td><td>T6/td></tr><tr><td>T7</td><td>T8</td></tr><tr><td colspan=\"2\">span 2</td></tr></table>");
        emailTask.SendEmail (email.Build ());
    }

I have tried something like this on my native side (I am building a cross-platform application). But I cannot see the table generated inside Gmail or Native email apps on my ASUS Zenfone 2 only the content of the table (just like "T1T2T3T4T5T6T7T8span 2".

cjlotz commented 8 years ago

The plugin doesn't do anything special with regards to html formatting. I'm not sure which tags are supported on the different platforms and what workarounds are required to get it working. As there is nothing that the plugin can do about this, I'm closing the issue.