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?