Send a new email in Qt
This code example shows how to send an email using the Qt Mobility messaging API.
Article Metadata
//Create message service objects
QMessageServiceAction* msgAction = new QMessageServiceAction ( this);
// Create a new email
QMessage msg;
msg.setType(QMessage::Email);
// Add required parameters
msg.setTo (QMessageAddress("qt@forum.nokia.com",QMessageAddress::Email));
msg.setSubject("QT email example");
//Set message body
msg.setBody("This is test message!");
// Add Attachments
QStringList attachments;
attachments.append("abc.jpg");
msg.appendAttachments(paths);
//Send email message
msgAction->send(msg);


Hi, Good work. Can you please attach a zip file containing the buildable project?
Regards,
Girish.
Ta-X -
Hi yes that wuld realy help usTa-X 15:32, 6 September 2011 (EEST)
Hamishwillee - Agreed, and fill in ArticleMetaData
Thank you very much. The text is useful but lacks the headers to include and libraries to link against. As Girish and Ta-X indicate, the best solution for this is a buildable project.
In addition, I've added the ArticleMetaData template. Could you please enter the compatibility information, particularly devices, platforms and SDKs. This gives people an idea of whether the content is still relevant (after some time has gone by, knowing the SDK it last worked on can be very helpful.hamishwillee 05:19, 7 September 2011 (EEST)