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.ph...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;


TBuf<50> id;
id.Num(TInt(iNwInfo.iCellId));

msg.Append(id);
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