×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    3

    SetSubjectL error with SendAs

    Hello,

    Started programming for Symbian yesterday, so be kind

    Anyway, I'm trying to modify the SendAs example to make a really simple program to create a "Remote E-mail" message and put it in the outbox, with a specific recipient and subject. The target device is a Nokia 9300.

    The problem is that when I try to run SetSubjectL, an error dialog pops up, saying that the operation is not supported. This occurs even though I am filtering for capabilities and even checking for the subject capability before attempting the function.

    Here's the applicable code snippet.

    // Set the message type to use
    iSendAs->AddMtmCapabilityL(KUidMtmQueryCanSendMsg);
    iSendAs->AddMtmCapabilityL(KUidMtmQuerySupportedBody);
    iSendAs->AddMtmCapabilityL(KUidMtmQuerySupportSubject);
    const CDesCArray& mtms = iSendAs->AvailableMtms();
    iSendAs->SetMtmL(0);

    // Create the message in the draft folder
    iSendAs->CreateMessageL();

    // Set subject
    iSendAs->SetSubjectL(_L("Test"));

    // Set address
    iSendAs->AddRecipientL(_L("Test Address"));

    // Save message
    iSendAs->SaveMessageL(ETrue);


    If I comment out the SetSubjectL call, the message is properly created with the desired recipient, so everything else works OK.

    On a related note, currently I am indexing the MTM quite stupidly. Is there a better way for me to determine which MTM in the list is Remote E-mail?

    I'm fully open to using different classes, etc., as long as they work :P

    Thanks in advance.

    Bruce
    Last edited by Brucmack; 2005-11-09 at 14:24.

Similar Threads

  1. MMS via SendAs
    By LucyT in forum General Messaging
    Replies: 2
    Last Post: 2005-09-23, 14:03
  2. SendAs v1.0 Example
    By miriamgs in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-02-28, 09:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •