Question

I want to develpoe an app which sends email from IMAP4 settings of the phone. And I am following this perticular wiki.

RSendAs send;
User::LeaveIfError(send.Connect());
CleanupClosePushL(send);

     RSendAsMessage sendMsg;
sendMsg.CreateL(send,**KUidMsgTypeSMTP** );
CleanupClosePushL(sendMsg);
sendMsg.SetSubjectL(_L("Incident Capture."));
sendMsg.AddRecipientL(_L("abc@xyz.com"),RSendAsMessage::ESendAsRecipientTo);
sendMsg.SetBodyTextL(_L("Image Attached"));

TRequestStatus status;
//add attachment
sendMsg.AddAttachment(_L("C:\\Data\\Images\\hhj.jpg"),status);
User::WaitForRequest(status);

sendMsg.SendMessageAndCloseL();
CleanupStack::Pop();
CleanupStack::PopAndDestroy();

Now I want KUidMsgtypeSMTP Uid. I am not getting how to use this thing. How do I get the value of this constant. when I used random Hex value 0x040, it gave me System Error (-1) at run time. Thanks in advance.

Was it helpful?

Solution

You need to #include <miutset.h> system header as it contains

const TUid KUidMsgTypeSMTP                      = {0x10001028}; // 268439592
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top