10-16-2013 07:32 AM
I need to send an email through my application, silently without user interaction.
The example mentioned here
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
using a default account gives the account ID as -1 and dint help either.
Need to find the valid account ID for email accounts.
Solved! Go to Solution.
10-16-2013 08:24 AM
10-16-2013 09:25 AM
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.
10-17-2013 03:25 PM
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.