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

Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
My Carrier: Vodafone, Airtel
Accepted Solution

How to Invoke Mail ??

How to set subject, body, Attachment in InvokeRequest for Mail Sending ?

InvokeManager invokeManager;
InvokeRequest request;

"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Posts: 81
Registered: ‎09-09-2013
My Device: BlackBerry Z10
My Carrier: Etisalat UAE

Re: How to Invoke Mail ??

Hello -

Please check the below doc link. let us know how it goes.


Kareem ELSayed | Application Development Consultant | Developer Relations | BlackBerry | Twitter:@kemobyte
Posts: 19
Registered: ‎01-18-2013
My Device: Z10 10.2
My Carrier: Chunghwa Telecom

Re: How to Invoke Mail ??

ActionItem {
            title: "action"
            imageSource: "asset:///images/ic_email.png"
            ActionBar.placement: ActionBarPlacement.OnBar
            attachedObjects: [
                Invocation {
                    id: invoke
                    query {
                        //id: invokeQuery
                        uri: "mailto:XXXX@hotmail.com?subject=this%20is%20Subject&body=This%20is%20body"
                        invokeActionId: "bb.action.SENDEMAIL"
                        invokeTargetId: "sys.pim.uib.email.hybridcomposer"
            onTriggered: {

 This is what I use in qml file

set subject and body in "uri"

notice that if you want key in a space , you need to key in "%20"

not just a space


Hope this will help you


Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to Invoke Mail ??

Neither of those show the OP how to actually do it with an attachment.

Note that (at least prior to 10.2) it wasn't possible to do this in QML, despite the apparent implication of the docs page Kareem links above.

Shadid showed the only (?) known way both to prepopulate header fields AND to include an attachment in this post: http://supportforums.blackberry.com/t5/Native-Development/Invoke-Email-with-Attachment/m-p/2251453#M... (and you have to do it from C++).

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!