Official Murl Engine Forum
Sending an email - Printable Version

+- Official Murl Engine Forum (http://murlengine.com/forum)
+-- Forum: Murl Engine (http://murlengine.com/forum/forumdisplay.php?fid=5)
+--- Forum: General (http://murlengine.com/forum/forumdisplay.php?fid=8)
+--- Thread: Sending an email (/showthread.php?tid=29)



Sending an email - Stefan - 21 Jun 2013

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.");
}



RE: Sending an email - dizzy - 21 Jun 2013

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


RE: Sending an email - Stefan - 21 Jun 2013

Yeah, sorry.
Anyway, how can I call this form without knowing the recipient before?