×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Dec 2006
    Location
    pune
    Posts
    76

    Question Message Sending failed !!!!!

    hi all ,

    i used CSendAs::ClientMtm and CSendAs::ClientRegistry for sending massage.
    i put some code here plz tell me why not sending massage through my code .

    TRAPD(aError,sendAs = CSendAs::NewL(*this));
    sendAs->SetMtmL(KUidMsgTypeSMS);
    sendAs->SetService(0);

    sendAs->CreateMessageL(KMsvGlobalOutBoxIndexEntryId);
    sendAs->AddRecipientL(KTelNumber);
    sendAs->ClientMtm().Body().InsertL(0, KTag);
    TInt r;
    User::LeaveIfError(r = sendAs->ValidateMessage());
    sendAs->SaveMessageL(ETrue);

    // Get the client mtm
    CBaseMtm &clientMtm = sendAs->ClientMtm();
    // Get the session of the client
    CMsvSession &session = clientMtm.Session();

    CClientMtmRegistry *mtmUiRegistry = CClientMtmRegistry::NewL( session, 30000000 );
    // Create base mtm ui
    //CBaseMtm * baseMtm;
    TRAPD(aError1, baseMtm= mtmUiRegistry->NewMtmL( KUidMsgTypeSMS ));

    TMsvEntry entry(sendAs->ClientMtm().Entry().Entry());
    entry.iDate.HomeTime();
    entry.SetOffPeak(EFalse);
    sendAs->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=baseMtmUi->InvokeAsyncFunctionL(ESmsMtmCommandScheduleCopy,*sel,dummy,waiter->iStatus);
    waiter->Start();
    SetActive();

    CActiveScheduler::Start();

    CleanupStack::PopAndDestroy(3);


    in Runl
    void sendsms::RunL()
    {
    console->Printf(_L("runl"));
    }
    plz tell me error in my code .after sending sms i give Message Sending failed !!!!!

    and message is save into outbox but after sending that they give Message Sending failed and deferred message.

    for ref code i used this link .
    http://www3.symbian.com/faq.nsf/0/53...8?OpenDocument

    plz any one help me.

  2. #2
    Regular Contributor
    Join Date
    Dec 2006
    Location
    pune
    Posts
    76

    Question Re: Message Sending failed !!!!!

    hi all ,
    i think problem is AddObserverL

    plz tell me how to add observer in my code . i used below line for adding observer

    sendAs->ClientMtm().Session().AddObserverL( *this );

    but *this means class derived from MMsvSessionObserver but i can derived from MSendAsObserver .for sendas object
    TRAPD(aError,sendAs = CSendAs::NewL(*this));

    plz any one tell me how to add addobserverl in my class.

    plz help me .

  3. #3
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: Message Sending failed !!!!!

    What is s60 edition you are using... the method ur using to send is followed in 2nd & 1st Edition.

    New way to do is
    TRAPD(err, entry->CopyL(iSmsMtm->Entry().EntryId(), iSmsMtm->ServiceId(), iStatus) );

    Check out the s60 example here
    http://forum.nokia.com/info/sw.nokia..._0_en.zip.html

    One more thing check the sending state of ur Msg.. is it.. KMsvSendStateWaiting?

    U can set it by doing indexEntry.SetSendingState(KMsvSendStateWaiting);

  4. #4
    Regular Contributor
    Join Date
    Dec 2006
    Location
    pune
    Posts
    76

    Re: Message Sending failed !!!!!

    hi mrudulpen and all .


    thanks for reply.

    plz any one help me about CSendAs::ClientMtm and CSendAs::ClientRegistry for sending massage.

    plz help me.

Similar Threads

  1. Problem with Cabride.c++ v1.1
    By markovuksanovic in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2007-01-24, 20:05
  2. Message Sending Failed
    By pnkdrg in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-01-15, 14:40
  3. Sending Message automatically
    By vniles in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-12-11, 11:44
  4. Problem sending MMS message with smil in Nokia Connectivity Framework
    By infospaceAngela in forum General Messaging
    Replies: 2
    Last Post: 2004-07-20, 19:00
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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