Sending an email
#1
Apost 
Hi!

Forcing the default email form to show up is somehow strange. Sending an email without any recipients just returns true and nothing else happens, but if I call AddToRecipient(...) before, sending fails and the email form appears. The desired behavior would be to show the form without adding recipients before or invoking the send method.

IEMail* email = state->GetDeviceHandler()->CreateEMail(subject, message);
if(email != 0)
{
    email->AddToRecipient(address);
    if(email->Send())
    {
        Debug::Trace("Failed to send email.");
    }
}
else
{
    Debug::Trace("Failed to create email.");
}
Reply
#2
Apost 
Did you by any chance mean
    if(!email->Send())
    {
        Debug::Trace("Failed to send email.");
    }

instead of
    if(email->Send())
    {
        Debug::Trace("Failed to send email.");
    }

?

Regards,

dizzy
Reply
#3
Apost 
Yeah, sorry.
Anyway, how can I call this form without knowing the recipient before?
Reply


Forum Jump:


Copyright © 2011-2017 Spraylight GmbH.