| Reply | « Previous Thread | Next Thread » |
|
Hey folks,
this is a cross post from the Symbian C++ Network forum. Because my problem is related to Python as well, I decided to post it in this group too. I wrote a messaging library that uses the Symbian Messaging System to send SMS, MMS, and email. The library is used as a backend for some python scripts. While sending SMS and MMS works like a charm, sending emails is giving me headaches. I'm sure you can help. The problem is that the CMsvOperation created by CBaseMtmUi::CopyToL never finishes. The symptom is as follows: - the msg is created - and sent - during this, an infobox pops up saying "Establishing connection via <ASP>" (translation from German - so it might be different in the English version) and never disappears. The python console is blocked. When I use python over a BlueTooth connection I still can enter commands, but after executing a CMsvOperation::Cancel the whole python process dies. I'm glad for any help, thanks in advance Lukas My sending code: TInt CxMSBackend::sendSMTPL() { CLog::logL( _L("CxMSBackend::sendSMTPL +") ); CSmtpClientMtm* smtpMtm = STATIC_CAST(CSmtpClientMtm*, iMtm ); CMtmUiRegistry* mtmUiRegistry = CMtmUiRegistry::NewL(smtpMtm->Session(), 1000000); CBaseMtmUi* baseMtmUi = mtmUiRegistry->NewMtmUiL(*smtpMtm); TMsvSelectionOrdering ordering; ordering.SetShowInvisibleEntries(ETrue);// SMTP services are invisible ordering.SetGroupByMtm(ETrue); CMsvEntry* entry1 = CMsvEntry::NewL(*iSession, KMsvRootIndexEntryId, ordering ); CMsvEntrySelection* rootChildren = entry1->ChildrenWithMtmL(KUidMsgTypeSMTP); if (rootChildren->Count() == 0) return KErrNotFound; CMsvEntry* entry2 = iSession->GetEntryL( KMsvGlobalOutBoxIndexEntryId ); smtpMtm->SwitchCurrentEntryL( entry2->EntryId() ); smtpMtm->CreateMessageL((*rootChildren)[0]); CImSmtpSettings* set = new(ELeave) CImSmtpSettings(); set->CopyL(smtpMtm->Settings()); smtpMtm->AddAddresseeL(iRecipient->Des()); smtpMtm->SetSubjectL(iSubject->Des()); smtpMtm->Body().InsertL(0, iBody->Des()); set->SetServerAddressL( iSmtpServer->Des() ); // Seems to be not supported! set->SetPort( iSmtpServerPort ); // Seems to be not supported! set->SetEmailAddressL( iSmtpSenderAdr->Des() ); // Seems to be not supported! set->SetSendMessageOption(ESendMessageImmediately); smtpMtm->SetSettingsL(*set); CMsvEntry* entry3 = &smtpMtm->Entry(); TMsvEntry tMsvEntry = entry3->Entry(); tMsvEntry.SetInPreparation(EFalse); tMsvEntry.SetScheduled(ETrue); tMsvEntry.SetSendingState(KMsvSendStateWaiting); entry3->ChangeL(tMsvEntry); smtpMtm->SaveMessageL(); CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection; sel->AppendL(entry3->EntryId()); smtpMtm->SwitchCurrentEntryL(entry3->Entry().iServiceId); iOperation = baseMtmUi->CopyToL(*sel, iStatus); SetActive(); SAFE_DEL(sel); SAFE_DEL(set); SAFE_DEL(entry3); SAFE_DEL(entry2); SAFE_DEL(rootChildren); SAFE_DEL(entry1); SAFE_DEL(baseMtmUi); SAFE_DEL(mtmUiRegistry); CLog::logL( _L("CxMSBackend::sendSMTPL -") ); return KErrNone; } |
| lukas.pustina |
| View Public Profile |
| Find all posts by lukas.pustina |
|
Take a look your code first and last line:
Code:
CMsvEntrySelection* sel = new (ELeave) CMsvEntrySelection; sel->AppendL(entry3->EntryId()); smtpMtm->SwitchCurrentEntryL(entry3->Entry().iServiceId); iOperation = baseMtmUi->CopyToL(*sel, iStatus); SetActive(); SAFE_DEL(sel); |
| simo.salminen |
| View Public Profile |
| Find all posts by simo.salminen |
|
hello ,
Lukas , Many people here waiting for a library allowing us sending MMS in pys60 ... Could you share your code library when you have completed it ? |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Sending an image over email | jeclarim | Python | 3 | 2006-12-15 21:25 |
| CMsvOperation does not finish while sending email | lukas.pustina | Symbian Networking & Messaging | 0 | 2006-03-28 10:47 |
| Sending a remote email | Brucmack | General Symbian C++ | 0 | 2005-11-10 10:37 |
| Sending Email over GPRS | pankajmahto | General Symbian C++ | 0 | 2004-07-29 08:48 |
| Sending Email from SMS - Urgent | chiradeep_basu | General Messaging | 1 | 2002-09-23 01:35 |