Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 06:42, 14 June 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Send a new email in Qt

From Wiki
Jump to: navigation, search

This code example shows how to send an email using the Qt Mobility messaging API.

Article Metadata
Compatibility
Platform(s):
Symbian
Article
Created: talk2mks (11 Apr 2011)
Last edited: hamishwillee (14 Jun 2013)
//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);

Related topics

This page was last modified on 14 June 2013, at 06:42.
79 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×