Results 1 to 7 of 7

Thread: QTMobility API

  1. #1
    Join Date
    Sep 2010
    Location
    Chennai
    Posts
    37
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QTMobility API

    Hi,

    I want to send the email from my QTSimulator. I am using the following code for send the email.
    Qt Code:
    1. QMessage msg;
    2. msg.setType(QMessage::Email);
    3.  
    4. // Set recipient for our email message
    5. QString recipient("xxxxx@gmail.com");
    6. msg.setTo(QMessageAddress(QMessageAddress::Email, recipient));
    7.  
    8. // Define message subject, body and append attachment
    9. msg.setSubject("Messaging API example");
    10. msg.setBody("Hello,\n\nthis is an example message.");
    11.  
    12. // Send message using a new service handle
    13. QMessageService* svc = new QMessageService();
    14.  
    15. if (svc->send(msg))
    16. qDebug("Successfully sent message.");
    17. else
    18. qWarning("Failed to send message.");
    To copy to clipboard, switch view to plain text mode 

    But I got the following error...
    "Invalid message account ID
    Failed to send message."

    Please help me.. Thanks is advance.

    Is it possible to send mail from QT-Simulator? Can we do any configuration for network connectivity?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTMobility API

    No, I don't think this is possible.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Location
    Chennai
    Posts
    37
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QTMobility API

    Ok Thanks.. Then How can I solve this ? Please assist me.. I want to check the program is working or not..

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTMobility API

    Deploy it on a real device or on a system that supports the messaging framework.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2010
    Location
    Chennai
    Posts
    37
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QTMobility API

    hi,

    Thanks ...........

    how to make the system that supports the messaging framework ?
    Currently I am using the windows-7 and nokia qt sdk 1.1.0 version.



    Please help me. Thanks in advance

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTMobility API

    I'm just looking at your code... and I think it is incorrect. You can't create a standalone message with a standalone message service and expect it to work. How should the framework know what is the sender's address or which servers to use to transfer the messages? You probably need to use QMessageManager, QMessageAccount and family. Look at the "Service Actions" example for more details.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2010
    Location
    Chennai
    Posts
    37
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QTMobility API

    Thank u very much. I am started to work on that..

Similar Threads

  1. QTMobility API - Installation Error
    By Girija in forum Newbie
    Replies: 5
    Last Post: 15th October 2010, 11:35
  2. QTmobility why Backspace dont run on QTextedit
    By nhs_0702 in forum Qt Programming
    Replies: 1
    Last Post: 3rd June 2010, 02:30
  3. How to install QtMobility?
    By radeknati in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd June 2010, 10:30
  4. QtMobility and Visual Studio
    By estel in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th February 2010, 14:36
  5. trying QtMobility/Multimedia @ Qt4.6tp1
    By wiecko in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 23:37

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.