You Are Here:

Community: Wiki

This page was last modified on 27 March 2009, at 07:40.

Sending Emails with RSendAs

From Forum Nokia Wiki


Code for sending emails

For sending emails the follwing code can be used

Header Required:

#include <rsendas.h>
#include <rsendasmessage.h>
#include <senduiconsts.h>

Library needed:

LIBRARY  sendas2.lib

Source File:

RSendAs send;
User::LeaveIfError(send.Connect());
CleanupClosePushL(send);
 
RSendAsMessage sendAsMessage;
sendAsMessage.CreateL(send, KUidMsgTypeSMTP);
CleanupClosePushL(sendAsMessage);
 
sendAsMessage.SetSubjectL(_L("Welcome back to symbian"));
sendAsMessage.AddRecipientL(
_L("you@me.com"),SendAsMessage::ESendAsRecipientTo);
//adding to field
sendAsMessage.SetBodyTextL(_L("somebody@world.com"));
 
TRequestStatus status;
//adding attachments
sendAsMessage.AddAttachment(_L("c:\\splash.bmp"),status);
User::WaitForRequest(status);
 
sendAsMessage.SendMessageAndCloseL();
CleanupStack::Pop();
CleanupStack::PopAndDestroy();

Gokul.S.Kartha, DeviceDriven, -flauntr.com-"flaunt your stuff" --Everyourgokul 11:11, 24 April 2007 (UTC)

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia