Symbian C++ Email - Code - App Crash

↘锁芯ラ 提交于 2019-12-13 05:34:32

问题


I am using the following code for send the email in symbian c++ (I am using the Symbian_3_SDK_v0_9_en for developing in Windows 7)

I got the application crash when the line "sendAsMessage.CreateL(send, KUidMsgTypeSMTP);" reached.

Please assist me.. How to solve this. I am very new to the symbian c++. Thanks in advance

    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(
                                  "123@gmail.com"),RSendAsMessage::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();

回答1:


As is usual "I got the application crash" is not enough information - how did the application crash? What is the Panic code and Panic reason?



来源:https://stackoverflow.com/questions/4020601/symbian-c-email-code-app-crash

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!