问题
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.
回答1:
You need to #include <miutset.h>
system header as it contains
const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592
来源:https://stackoverflow.com/questions/1990784/not-able-to-get-the-type-of-messagetype-in-email-app-of-symbian-3rd