Monday, July 30, 2007

How to Sending SMS in Symbian 9

User::LeaveIfError(sendAs.Connect());
CleanupClosePushL(sendAs);

RSendAsMessage sendAsMessage;
sendAsMessage.CreateL(sendAs, KUidMsgTypeSMS);
CleanupClosePushL(sendAsMessage);

// prepare the message
sendAsMessage.AddRecipientL(aRecipient, RSendAsMessage::ESendAsRecipientTo);
sendAsMessage.SetBodyTextL(aMessageBody);

// send the message
sendAsMessage.SendMessageAndCloseL();

// sendAsMessage (already closed)
CleanupStack::Pop();

// sendAs
CleanupStack::PopAndDestroy();

No comments:

stats counter