Hi all.
I'm experiening slight problem while trying to send an MMS. In emulator all goes well and message is moved to send folder. But in real phone I receive message-format-corrupt error. I'm using 2nd edition FP3 and the SDK:s mmssend example.
All i'm trying to do is to add one picture as an attachment and send it. I searched this forum, but at least the solution found in http://discussion.forum.nokia.com/fo...&highlight=MMS
didn't work for me. MyApp also manages to move the message to outbox, but thats where it will stay. If I save the "corrupted" message to drafts and send it from there there is no problem.
Here is the code i'm using
AndCode:void CMmssSendHandler::PopulateMessageL( TMsvEntry& aMsvEntry ) { TFileName appDriveAndPath; appDriveAndPath = _L("c:\\Nokia\\Images\\myImage.jpg"); const TUint8 KAssignedNumberJpeg( 0x1E ); TPtrC8 jpegPtr( KContentTypeTable[KAssignedNumberJpeg] ); TMsvId attachmentId3( KMsvLocalServiceIndexEntryId ); AddMultimediaAttachment2L( attachmentId3, jpegPtr, appDriveAndPath ); aMsvEntry.iDetails.Set( iRecipientText ); aMsvEntry.SetInPreparation( EFalse ); aMsvEntry.SetVisible( ETrue ); aMsvEntry.SetSendingState( KMsvSendStateWaiting ); aMsvEntry.iDate.HomeTime(); }
So the difference between mmssend example and myapp is that i'm just sending my own picture as an attachment.Code:void CMmssSendHandler::AddMultimediaAttachment2L( TMsvId& attachmentId, TPtrC8& aType, TFileName aObjFullPathAndName ) { if ( iMtm ) { CMmsClientMtm* mmsMtm = static_cast<CMmsClientMtm*>( iMtm ); RFs fs; TParse fp; TInt result( fs.Connect() ); if ( KErrNone != result ) { iObserver.HandleAttachmentErrorL( MMsvObserver::EConnectionFailed ); fs.Close(); } TInt result2( fs.Parse( aObjFullPathAndName, fp ) ); if ( KErrNone != result2 ) { iObserver.HandleAttachmentErrorL( MMsvObserver::EFileNameWrong ); fs.Close(); } fs.Close(); mmsMtm->CreateAttachment2L( attachmentId, aObjFullPathAndName ); mmsMtm->SetAttachmentTypeL( attachmentId, aType ); mmsMtm->SetMessageRootL( attachmentId ); mmsMtm->SaveMessageL(); } }
All other code pieces are the same as in mmssend example
could anyone help ?




