Hi,
i want to extract the from address and body from the incoming SMS, but it is failed to extract the from address (and may be body not confirmed) from SMS,
i am working on s60 3rd fp1, so kindly help me , using following code:
........
// Get address of received message.
TBuf<KSmsMessageLength> iAddress(iMsvEntry->Entry().iDetails);
if (store->HasBodyTextL())
{
CSmsClientMtm* SmsMtm = STATIC_CAST(CSmsClientMtm*,iEngine->iClientMtmReg->NewMtmL(KUidMsgTypeSMS));
if(SmsMtm)
{
CleanupStack::PushL(SmsMtm);
SmsMtm->SwitchCurrentEntryL(iNewMessageId);
SmsMtm->LoadMessageL();
CDesCArrayFlat* AddressArray = new (ELeave)CDesCArrayFlat(1);
HBufC* BodyBuffer = HBufC::NewL(SmsMtm->Body().DocumentLength());
TPtr BodyPoint(BodyBuffer->Des());
SmsMtm->Body().Extract(BodyPoint,0,SmsMtm->Body().DocumentLength());
for(int i = 0; i < SmsMtm->AddresseeList().Count(); i++)
{
TBuf<100> buf;
buf.Copy(SmsMtm->AddresseeList()[i]);
AddressArray->AppendL(buf);
}
TMsvEntry msvEntry((SmsMtm->Entry()).Entry());
iObserver.MessageReceivedL(iNewMessageId,AddressArray,BodyBuffer);
CleanupStack::PopAndDestroy(1);
}
}
thanx in advance.



