Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Member
Posts: 1
Registered: ‎06-30-2013
My Device: Z10
My Carrier: Optus

Composing a HTML email

Hi All,


I am trying to fulfill a requirement for a client that requires a HTML email to be generated.


I have tried passing HTML content to the email composer but it just gets rendered as text. 


Does the email client support HTLM formatted emails?


Code I am using is below.


    subject: "Email subject",
    body: "<html><body>this is html content...</body></html>"
Which results in the HTML rendered as text.
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Composing a HTML email

The problem you appear to be having is not being able to set headers correctly


This should be possible via AJAX to a server with ease


If you want it directly from device the obvious method is an invoke of the mail client

Click the like button if you find my posts useful!
Posts: 114
Registered: ‎06-14-2010
My Device: Passport
My Carrier: Virgin Mobile Canada

Re: Composing a HTML email

Paradox, can you clarify what you mean?


I'm developing a BB10 WebWorks app that builds up an HTML fragment in a javascript variable then passes that variable via Invoke Email Composer, and it is just like the example above, raw HTML in the message body, and when received on the other end it is the same, not rendered in any email client as HTML should.


I'm thinking that the < and " and > and & characters are being escaped as &lt; and &quot; and &gt; and &amp; respectively... is there a way to inhibit that, maybe, as the solution to the problem?

Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Composing a HTML email

The Email Composer that gets invoked is only set up to handle PlainText emails.


We created a plugin to allow sending emails directly, but it's also defaulting to sending plaintext. It doesn't look like a big job to make it create an HTML one as well, but it doesn't support it today.


I'll open an issue for it on our public GitHub. I think it's a pretty useful feature.



Tim Windsor
Open Source Technical Lead
Posts: 114
Registered: ‎06-14-2010
My Device: Passport
My Carrier: Virgin Mobile Canada

Re: Composing a HTML email

[ Edited ]

Thanks Tim; it seems you can apply formatting to the text before you send the email, but it's not a full-featured HTML email. I know when it is possible to send fancy layouts via email from Webworks apps all sorts of new possibilties will present themselves (like invoking the camera and accepting text input descriptions, then fire off an email-able diary of a day or an event, possibly even tied to an image hosting service, sent directly from your device. Lots of ideas will spring from integrated HTML email support!