Namespaces
Variants
Actions
(Difference between revisions)

Send a new email in Qt

Jump to: navigation, search
m (moved Send a new email in QT to Send a new email in Qt: Moved Send a new email in QT to Send a new email in Qt)
m (Text replace - "<code cpp>" to "<code cpp-qt>")
 
(2 intermediate revisions by one user not shown)
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);
Line 45: Line 45:
 
* [[Send MMS using Qt Mobility]]
 
* [[Send MMS using Qt Mobility]]
 
* [[Read and Send messages in Qt for Symbian]]
 
* [[Read and Send messages in Qt for Symbian]]
* [[Delete messages using Qt Mobility API in Qt for Symbian]]
+
* [[Delete messages using Qt Mobility API in Qt for Symbian]][[Category:MeeGo Harmattan]] [[Category:Symbian]]

Latest 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

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

This page was last modified on 11 October 2012, at 04:23.
337 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved