Hello,
Started programming for Symbian yesterday, so be kind
Anyway, I'm trying to modify the SendAs example to make a really simple program to create a "Remote E-mail" message and put it in the outbox, with a specific recipient and subject. The target device is a Nokia 9300.
The problem is that when I try to run SetSubjectL, an error dialog pops up, saying that the operation is not supported. This occurs even though I am filtering for capabilities and even checking for the subject capability before attempting the function.
Here's the applicable code snippet.
// Set the message type to use
iSendAs->AddMtmCapabilityL(KUidMtmQueryCanSendMsg);
iSendAs->AddMtmCapabilityL(KUidMtmQuerySupportedBody);
iSendAs->AddMtmCapabilityL(KUidMtmQuerySupportSubject);
const CDesCArray& mtms = iSendAs->AvailableMtms();
iSendAs->SetMtmL(0);
// Create the message in the draft folder
iSendAs->CreateMessageL();
// Set subject
iSendAs->SetSubjectL(_L("Test"));
// Set address
iSendAs->AddRecipientL(_L("Test Address"));
// Save message
iSendAs->SaveMessageL(ETrue);
If I comment out the SetSubjectL call, the message is properly created with the desired recipient, so everything else works OK.
On a related note, currently I am indexing the MTM quite stupidly. Is there a better way for me to determine which MTM in the list is Remote E-mail?
I'm fully open to using different classes, etc., as long as they work :P
Thanks in advance.
Bruce




