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)
No related wiki articles found