Page 1 of 1

MAPI - Mail, nRetcode allways returns 0 with incorrect email

Posted: Mon May 20, 2019 4:38 pm
by Jorge_T
Good afternoon everyone,

I can send emails without problems with Windows 10 and Thunderbird (MAPI), the problem is that when the address of the recipient is wrong Thunderbird detects it but the return value of the message has been sent is always 0 so when sending several messages from an application to the end there is no way to control which ones have not been sent.

I'm stuck with the subject and I can not see the solution,
Image

#include "FiveWin.ch"
#include "mail.ch"
function EMessage()
Local oMail
DEFINE MAIL oMail ;
SUBJECT "Asunto..." ;
TEXT "Cuerpo del mensaje....." ;
TO "demo@demostracionx.com" //is a incorrect email but returns 0
ACTIVATE MAIL oMail

MsgInfo( oMail:nRetCode )

return nil