unable to send message using RSendAs

Login to reply to this topic.
Tue, 2008-04-01 19:10
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<32> msg;
      
        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


Wed, 2008-04-02 10:06
Joined: 2007-04-10
Forum posts: 17
Re: unable to send message using RSendAs

Hi, I had the same problem some times. Then I found out that it always appear with some messages from the server in which the telephones were 34XXXXXXXXXX+ telephone, where 34 is the spanish prefix. Then I had to insert the + or 00 symbol befol the national preffix: 0034XXXXXXXXXX or +34XXXXXXXXXX.

Wed, 2008-04-02 10:43
Joined: 2007-10-21
Forum posts: 20
Re: unable to send message using RSendAs


Re: unable to send message using RSendAs

Hi, I had the same problem some times. Then I found out that it always appear with some messages from the server in which the telephones were 34XXXXXXXXXX+ telephone, where 34 is the spanish prefix. Then I had to insert the + or 00 symbol befol the national preffix: 0034XXXXXXXXXX or +34XXXXXXXXXX.

While checking my outbox, the assigned target adddress is already in the form of +91XXXXXXXXXX (india's country code: 91) so i guess that is not the issue here

Wed, 2008-04-02 14:43
Joined: 2007-04-10
Forum posts: 17
Re: unable to send message using RSendAs

And you can send a SMS to the +91XXXXXXXXXX number from the SMS app inside the mobile?

Wed, 2008-04-02 18:17
Joined: 2007-10-21
Forum posts: 20
Re: unable to send message using RSendAs


Re: unable to send message using RSendAs
new

And you can send a SMS to the +91XXXXXXXXXX number from the SMS app inside the mobile?

from the outbox where it lies as a failed message, i am able to resend it... but not through my application. My application tries to send it but i have no clue why it's unable to, resulting in a failed message in my outbox

Thu, 2008-04-03 08:41
Joined: 2007-04-10
Forum posts: 17
Re: unable to send message using RSendAs

I am able to send SMS without problems, the only diference in my code is:

sendAsMessage.CreateL(sendAs, KUidMsgTypeSMS);

instead

messg.CreateL(saSrv, KSenduiMtmSmsUid);

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

Well i got it to work finally... some bug there i guess, if the recipient is someone from ur contacts, the message gets stuck. I removed the recipient from the contacts and voila... !! Smiling

  • Login to reply to this topic.