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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 61
Registered: ‎10-16-2013
My Device: Z10
My Carrier: vodaphone
Accepted Solution

Email not getting send

I need to send an email through my application, silently without user interaction.

The example mentioned here 

https://developer.blackberry.com/native/documentation/cascades/device_platform/pim/messages.html

does not help, for MessageBuilder does not have a default constructor.

it has a static method create, that needs an account ID.

i'm unable to gather inputs to retrive this account ID for email.

as mentioned here

http://supportforums.blackberry.com/t5/Native-Development/Send-email-is-getting-failed-on-personal-s...

using a default account gives the account ID as -1 and dint help either. 

Need to find the valid account ID for email accounts.

Please help!!

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Email not getting send

Welcome to the forums.

 

I'm not sure this is possible, you could interact with a server for silent emailing?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 61
Registered: ‎10-16-2013
My Device: Z10
My Carrier: vodaphone

Re: Email not getting send

I'm not sure i m getting your answer, what i ment to say was :

MessageBuilder* _builder = (MessageBuilder::create(_accountID));

I'm unable to get the '_accountID' for email account, like for sms-mms we would provide,

 

QList<Account> account_list = _accountService->accounts(Service::Messages, "sms-mms");

// save its internal ID value for future API calls
_smsAccountId = account_list.first().id();

 

I want to do the same for Email messages.

Help!!

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Email not getting send

You should be able to get a default account if one is set up (is there an email account on the device you tested with?), but you could also go through the list of accounts returned from accountService::accounts (Service::Typeservice) and pick the one you want.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 61
Registered: ‎10-16-2013
My Device: Z10
My Carrier: vodaphone

Re: Email not getting send

Set the default account on the device, and it worked Smiley Very Happy

Thanks a tonn!! Smiley Very Happy