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

Native Development

Reply
Developer
Posts: 188
Registered: ‎09-03-2012
My Device: Blackberry 10

Share email with more than 1 attachment and HTML format?

I tried to share item detail by email and html doesn't work well. Could you please help?

 

This is the code to share:

 

    InvokeManager invokeManager;
    InvokeRequest request;
    request.setAction("bb.action.COMPOSE");
    request.setMimeType("message/rfc822");
    QVariantMap data;
    data["subject"] = tr("Item: ") + item.name();
    QString body("html text here");
    data["body"] = body;
    QVariantList attachmentList;

    // set attachment list here

    data["attachment"] = attachmentList;

    QVariantMap moreData;
    moreData["data"] = data;
    bool ok;
    request.setData(bb:Smiley TonguepsObject::encode(moreData, &ok));

    invokeManager.invoke(request);

 

 

End result is bad:

 

 

Name: Test

Description: <p><span style="background-color: rgb(255, 255, 0);">Tsn.ca hello</span>.</p><p>Hello</p><

ol><li>Test1</li><li>Test 2</li></ol><p><br data-mce-bogus="1"></p><ul><li>Test 3</li></ul><p><br data-mce-bogus="1"></p><p><br data-mce-bogus="1"></p><p>Cnn.com.</p><p><br data-mce-bogus="1"></p><p><br data-mce-bogus="1"></p>
 
 
 
 
Thanks.