×
Namespaces

Variants
Actions
(Difference between revisions)

Send a new email in Qt

From Nokia Developer Wiki
Jump to: navigation, search
talk2mks (Talk | contribs)
(Created page with 'Category:QtCategory:Qt for Symbian '''Overview''' This code example shows how to use messaging API in Qt for symbian. Code demonstrate how to send email. Code example us…')
 
chintandave_er (Talk | contribs)
m (code formatting)
Line 4: Line 4:
 
This code example shows how to use messaging API in Qt for symbian. Code demonstrate how to send email. Code example uses Messaging APIs. Purpose of this code example is to show how to use Qt and QtMoblity APIs to send emails.
 
This code example shows how to use messaging API in Qt for symbian. Code demonstrate how to send email. Code example uses Messaging APIs. Purpose of this code example is to show how to use Qt and QtMoblity APIs to send emails.
  
<code>
+
<code cpp>
  
 
//Create message service objects
 
//Create message service objects

Revision as of 09:52, 11 April 2011

Overview

This code example shows how to use messaging API in Qt for symbian. Code demonstrate how to send email. Code example uses Messaging APIs. Purpose of this code example is to show how to use Qt and QtMoblity APIs to send emails.

//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);
116 page views in the last 30 days.
×