×
Namespaces

Variants
Actions
(Difference between revisions)

Send a new email in Qt

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Text replace - "Category:MeeGo" to "Category:MeeGo Harmattan")
hamishwillee (Talk | contribs)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
Line 18: Line 18:
 
}}
 
}}
  
<code cpp>
+
<code cpp-qt>
 
//Create message service objects
 
//Create message service objects
 
QMessageServiceAction* msgAction = new QMessageServiceAction ( this);
 
QMessageServiceAction* msgAction = new QMessageServiceAction ( this);

Revision as of 04:23, 11 October 2012

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 (11 Oct 2012)
//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

161 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.

×