Hi.
I had these codes to create and send SMS using Class CSendAs. After running this in a 7650 the message gets stuck in the outbox. Why is it so? Is there a function or method to send it automatically?

Here is the code:

void SMSSendAppUi::CreateNewSMSMsgL()
{
delete iSendAs;
iSendAs = CSendAs::NewL(*this);
if(iSendAs)
{
iSendAs->SetMtmL(KUidMsgTypeSMS);
//using default SC
iSendAs->SetService(0);

//Create a new message in outbox folder
iSendAs->CreateMessageL(KMsvGlobalOutBoxIndexEntryId);
iSendAs->AddrecipientL(iRecipient->Des());
iSendAs->ClientMtm().Body().InsertL(0, MY_MESSAGE);

//Message is saved in Outbox Folder
iSendAs->SaveMessageL(ETrue);
}
}