Welcome!

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

Reply
New Member
Maurice321
Posts: 1
Registered: ‎06-30-2013
My Device: Z10

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.

 

window.blackberry.invoke.card.invokeEmailComposer({
    subject: "Email subject",
    body: "<html><body>this is html content...</body></html>"
});
 
Which results in the HTML rendered as text.
 
Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

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!
Please use plain text.
Regular Contributor
lorax1284
Posts: 69
Registered: ‎06-14-2010
My Device: Passport

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?

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 832
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.

 

https://github.com/blackberry/WebWorks-Community-APIs/issues/292

Tim Windsor
Open Source Technical Lead
Please use plain text.
Regular Contributor
lorax1284
Posts: 69
Registered: ‎06-14-2010
My Device: Passport

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!

Please use plain text.