0
votes

In Blackberry Cascades 10 (C++, Qt, QML), how do I invoke an email client with the fields populated?

I have looked into this - and here is what I have tried to do:

InvokeManager invokeManager;
InvokeRequest request;

request.setTarget("sys.pim.uib.email.hybridcomposer");    
request.setAction("bb.action.OPEN, bb.action.COMPOSE");
request.setMimeType("message/rfc822");

QString data = QString("{ \"to\" : [\"" + btnEmailTo_->text() + "\"], \"subject\" : \"---This is the Subject---\", \"body\" : \"---This is the Body---\" }");

request.setData(data.toUtf8());

if (reply_ = invokeManager.invoke(request)) QObject::connect(reply_, SIGNAL(finished()), this, SLOT(onInvokeResult()));

But it seems like this brings up an email client - but none of the fields are populated.

(In case you are wondering - the blackberry device I am testing this on as a main email account setup for - that when you press send in the email client - it does send from the email account set up in the blackberry.)

1

1 Answers

0
votes

The information about invoking emails can be found here: http://developer.blackberry.com/cascades/documentation/device_platform/invocation/email.html#ufa1355425510139.

The only thing I can guess from reading there is that you've screwed up the action -- it should be only bb.action.COMPOSE according to the documentation when invoking an email with pre-populated fields using data in JSON.