1

電話のIMAP4設定からメールを送信するアプリを開発したい。そして、私はこの特定の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();

ここで、KUidMsgtypeSMTPUidが必要です。私はこのことの使い方を理解していません。この定数の値を取得するにはどうすればよいですか。ランダムな16進値0x040を使用すると、実行時にシステムエラー(-1)が発生しました。前もって感謝します。

4

1 に答える 1

1

#include <miutset.h>ヘッダーが含まれているため、システムヘッダーを作成する必要があります

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