Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QMessageManager can not find email account.

    Mobile and Embedded
    1
    1
    1919
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nlehikoi last edited by

      Hello,

      The program:

      @
      QMessageManager manager;
      foreach (const QMessageAccountId &id, manager.queryAccounts())
      {
      QMessageAccount account(id);
      if (account.messageTypes() & QMessage::Email)
      {
      //start composing email * for instance
      }
      }
      @

      The problem: messagemanager can not find any email accounts on my Nokia 5230 although there most certainly is an account defined and defaulted. For instance if I go to Gallery and want to send an image as an email attachment the Gallery readily finds the default account and starts composing.

      But when my qt mobility test app does the following...

      @
      QMessage message;
      message.setType(QMessage::Email);
      message.setParentAccountId(QMessageAccount::defaultAccount(QMessage::Email));
      message.setTo(QMessageAddress(QMessageAddress::Email, mail_account));
      message.setSubject("testsubject");
      message.setBody("testbody");
      QMessageService ms;
      ms.compose(message);
      @

      ... I get a message 'No mailbox defined. Define now?'. What am I missing?

      I am Using Nokia Qt SDK
      Qt Creator 2.0.1, Qt Mobility 1.0.2, Symbian SDK 4.6.3-3

      Best Regards,

      Niko

      1 Reply Last reply Reply Quote 0
      • First post
        Last post