1) i connect to my pop3 mail box using
MailCommandL(KPOP3MTMConnect,null);

2) Then i fetch my emails using the following code
Pop3GetMailInfo.iMaxEmailSize = KMaxTUint;
Pop3GetMailInfo.iDestinationFolder = iServiceId;
TPckgBuf<TImPop3GetMailInfo> package(Pop3GetMailInfo);
MailCommandL(KPOP3MTMCopyAllMailWhenAlreadyConnected,package);
in the above code "iServiceId" is the TMsvId of the pop service in my email account (pop + smtp) that i have created in my device.

3) Then i create an email in my outbox using the smtp mtm with the following code
if(! iSmtpMtm)
iSmtpMtm = static_cast<CSmtpClientMtm*>(iMtmReg->NewMtmL(KUidMsgTypeSMTP));
CleanupStack::PushL(iSmtpMtm);
TMsvEntry mailbox ;// TMsvEntry representing the pop service associated to my email account .
TMsvId sid;
User::LeaveIfError(iMsvSession.GetEntry(iServiceId,sid,mailbox));
iSmtpMtm->SwitchCurrentEntryL(KMsvGlobalOutBoxIndexEntryId);
iSmtpMtm->CreateMessageL(mailbox.iRelatedId);................................................................................
CImSmtpSettings* set = new (ELeave)CImSmtpSettings();
CleanupStack::PushL(set);
set->CopyL(iSmtpMtm->Settings());
iSmtpMtm->AddAddresseeL(_L("okok@yahoo.com"));
iSmtpMtm->SetSubjectL(_L("this is subject"));
set->SetSendMessageOption(ESendMessageImmediately);.................................i wish to send message immediately
iSmtpMtm->SetSettingsL(*set);
iSmtpMtm->SaveMessageL();
CleanupStack::PopAndDestroy(2);
iSmtpMtm = NULL;
set = NULL;

4) so far so good this succesfuuly creates an email message in my email account's outbox , with no body text just the recipent and subject fields .
Then i execute the following code to implement the trick , that sends the smtp messages immediately ....as specified on variuos threads at forum.nokia

TMsvEntry tmp; // this is the TMsvEntry representing the pop service associated with my email account in device
TMsvId eid;
User::LeaveIfError(iMsvSession.GetEntry(iServiceId,eid,tmp));
TImPop3GetMailInfo Pop3GetMailInfo;
Pop3GetMailInfo.iMaxEmailSize = KMaxTUint;
Pop3GetMailInfo.iDestinationFolder = tmp.Id();.....................................................................
TPckgBuf<TImPop3GetMailInfo> package(Pop3GetMailInfo);
MailCommandL(KPOP3MTMMoveAllMailWhenAlreadyConnected,package);


5) the MailCommandL() method is coded as
if(! iMsvSelection)
iMsvSelection = new(ELeave) CMsvEntrySelection();
iMsvSelection->Reset();
iMsvSelection->AppendL(iServiceId);// iServiceId is the TMsvId of pop3 in my mail account
iOperation=iPop3Mtm->InvokeAsyncFunctionL(aCommand,*iMsvSelection,aParams/*ptr*/,iStatus);

Now .........the problem is that the created email messages are not sent automatically , i have tried i guess every trick but no sucesss , i would like if you could explain the good practice to be implemented at the lines that i have marked with "....................."because i feel it is the place that is not letting the mail to be sent or ........whatever you feel just tell me i will try it up .

HOW do i set the email message text using smtp mtm .

WHEN i send the messages from outbox manually they are sent with no troubles , but are not sent automatically thats a problem .

i am realy feeling trouble because i was to implemet autmatic sms function and i thought that sending email would be easy but i just stuck up in email ...and had no idea how would i be doing it for sms.