unable to send message using RSendAs

Login to reply to this topic.
Tue, 2008-04-01 14:50
Joined: 2007-10-21
Forum posts: 20

I'm workin on an application (3rd edition) which sends the cell id along with some other information through an SMS. My code for retreiving the cell id is more or less based on the snippet posted on the nokia forum wiki : http://wiki.forum.nokia.com/index.php/Find_Out_Cell_ID_in_3rd_Edition

the above code catches the cell id through an active object. Now to send the cell id via an sms, i'v written the SMS sending logic in the runL method :

void CNetworkInfo::RunL()
    {

    User::LeaveIfError(iStatus.Int());
     // Request completed successfully.
    // Now we can notify our observer.
   
    TBuf<50> id;
  
    TBuf<32> msg;
        msg.Append(id);

        msg.Append(_L(" "));
        msg.Append(iNwInfo.iCountryCode);
       
        msg.Append(_L(" "));
        msg.Append(iNwInfo.iLongName);
       
       
        RSendAs saSrv;
        saSrv.Connect();
        CleanupClosePushL(saSrv);
              
        // Create your message
        RSendAsMessage messg;
        messg.CreateL(saSrv, KSenduiMtmSmsUid);
        CleanupClosePushL(messg);

        messg.AddRecipientL(address,RSendAsMessage::ESendAsRecipientTo);
       
       
       
        messg.SetBodyTextL(msg));
        
        // Send the message
        messg.SendMessageAndCloseL();
              
        // Cleanup
        CleanupStack::Pop(&messg);
        CleanupStack::PopAndDestroy(&saSrv);
       
       
    }

On execution I get a promp which says "unable to send message". On checking the outbox folder, i get the exact message i wanted to send as a failed message which i am able to successfully resend, but why not through my application?? I have added all capabilities. plz help Puzzled





Tue, 2008-04-01 14:58
Joined: 2007-10-21
Forum posts: 20
Re: unable to send message using RSendAs

id.Num(TInt(iNwInfo.iCellId));

Tue, 2008-04-01 15:03
Joined: 2007-10-21
Forum posts: 20
Re: unable to send message using RSendAs

p.s: @newLC administrators
on including the above line in my original first post, i got a strange error:

Method Not Implemented

POST to /node/add/forum/233 not supported.

i removed it and then could post... some magic line of code i guess.

  • Login to reply to this topic.