×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    9

    Failure sending SMS

    Hello,

    I'm trying to send an SMS immediately by creating an CSendAs instance and then actually sending the message by using InvokeAsyncFunctionL.

    But then I get the error Message "Failure sending SMS" and my message stays in the outbox.

    Can somebody tell me what I'm doing wrong?? I'm using Nokia 6600.

    My code is like following:

    iSendAs->ResetMtmCapabilitiesL();
    iSendAs->SetMtmL(KUidMsgTypeSMS);
    iSendAs->CreateMessageL(KMsvDraftEntryId);

    iSendAs->AddRecipientL(_L("myCellPhoneNumber"));

    CParaFormatLayer * paraformat = CParaFormatLayer::NewL();
    CleanupStack::PushL(paraformat);
    CCharFormatLayer * charformat = CCharFormatLayer::NewL();
    CleanupStack::PushL(charformat);
    CRichText * body = CRichText::NewL(paraformat, charformat);
    CleanupStack::PushL(body);
    body->InsertL(0, aSubject);
    iSendAs->SetBodyL(* body);


    iSendAs->SaveMessageL(ETrue);


    // sending SMS immediately

    TMsvEntry entry(iSendAs->ClientMtm().Entry().Entry());
    entry.iDate.HomeTime();
    entry.SetOffPeak(EFalse);
    entry.SetScheduled(ETrue);
    iSendAs->ClientMtm().Entry().ChangeL(entry);

    CMsvEntrySelection* sel = new(ELeave) CMsvEntrySelection;
    CleanupStack::PushL(sel);
    sel->AppendL(entry.Id());

    CMsvOperation* operation = NULL;
    CleanupStack::PushL(operation);

    CMsvOperationWait* waiter=CMsvOperationWait::NewLC();

    TBuf8<1> dummy;
    operation=iSendAs->ClientMtm().InvokeAsyncFunctionL(ESmsMtmCommandScheduleCopy,*sel,dummy,waiter->iStatus);
    waiter->Start();
    CActiveScheduler::Start();

    CleanupStack::PopAndDestroy(6);

  2. #2
    Registered User
    Join Date
    Feb 2004
    Posts
    124
    >But then I get the error Message "Failure sending SMS" and my message stays in the outbox.

    Look at the "Series 60 known issues" document..
    This is known bug with no workaround or
    fix available. (unless changed recently).

    !! You just cannot do it !!

  3. #3
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    195
    With the 2.0 SDK you cannot do this. It is because the CSendAs API does not set SMS service to the message. For this you would need the header for smssettings (smutset.h and smuthdr.h). This problem has been corrected in the 2.1 SDK.

    Best Regards,
    Ari / Forum Nokia

Posting Permissions

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