tags:

views:

20

answers:

1

Hi,

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(
                                  "[email protected]"),RSendAsMessage::ESendAsRecipientTo);          
   //adding to field
   sendAsMessage.SetBodyTextL(_L("[email protected]"));

   TRequestStatus status;
   //adding attachments
   //  sendAsMessage.AddAttachment(_L("c:\\splash.bmp"),status);
   //   User::WaitForRequest(status);

    sendAsMessage.SendMessageAndCloseL();
    CleanupStack::Pop();
    CleanupStack::PopAndDestroy();
+1  A: 

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?

KevinD
Sorry KevinD. I am a new bee to this one. I am trying to learn about the Panic code.. Could you please help me? How to use the panic in symbian. THanks in advance.
Girija
I'm presuming you are running this in the emulator, in which case by default you'll be launching your app directly. Switch to launching epoc.exe (in Carbide, Run > Debug configurations > [Select your debug config]. Then in the 'Main' tab, change 'Process to launch' to point to epoc.exe in the epoc32\release\winscw\udeb folder of your SDK).Once you've done this, when you debug the emulator will be launched but your app will not - find the app in the emulator and run it. When it fails, you'll get a dialog with the panic code and reason.
KevinD
Thanku very much KevinD.
Girija