1

我想开发一个从手机的 IMAP4 设置发送电子邮件的应用程序。我正在关注这个特定的维基。

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();

现在我想要 KUidMsgtypeSMTP Uid。我不知道如何使用这个东西。我如何获得这个常数的值。当我使用随机十六进制值 0x040 时,它在运行时给了我系统错误 (-1)。提前致谢。

4

1 回答 1

1

您需要#include <miutset.h>系统标题,因为它包含

const TUid KUidMsgTypeSMTP                      = {0x10001028}; // 268439592
于 2010-01-04T08:40:23.817 回答