×
Namespaces

Variants
Actions
(Difference between revisions)

Send a new email in Qt

From Nokia Developer Wiki
Jump to: navigation, search
chintandave_er (Talk | contribs)
m (code formatting)
hamishwillee (Talk | contribs)
m (Set correct categories)
Line 1: Line 1:
[[Category:Qt]][[Category:Qt for Symbian]]
+
[[Category:Qt Mobility]]
'''Overview'''
+
{{Abstract|visible=true|This code example shows how to send an email using the Qt Mobility [http://doc.qt.nokia.com/qtmobility-1.1/messaging.html messaging] API}}.
 
+
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 cpp>
 
<code cpp>
Line 28: Line 26:
  
 
</code>
 
</code>
 +
 +
== Related topics ==
 +
* [[Send MMS using Qt Mobility]]
 +
* [[Read and Send messages in Qt for Symbian]]
 +
* [[Delete messages using Qt Mobility API in Qt for Symbian]]

Revision as of 08:04, 14 April 2011

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

//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

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

×