Hi,
My client has configured the SMTP Mail Setup on smtp.office365.com. And the Test mail functionality is giving the below error message...
But we could sent sms thru custom code. My JOB Queue notification is not working due to the issue.
I have debugged to understand the issue, I found that the Codeunit 412 SMTP Test Mail has a function called "SendTestMail", its code as under.
SMTPMailSetup.GET; //Table 409
SMTPMail.CreateMessage( //Codeunit 400
'',
EmailAddress, //first
EmailAddress,
TestMailTitleTxt,
STRSUBSTNO(
TestMailBodyTxt,
USERID,
SMTPMailSetup."SMTP Server",
FORMAT(SMTPMailSetup."SMTP Server Port"),
SMTPMailSetup.Authentication,
SMTPMailSetup."Secure Connection",
SERVICEINSTANCEID,
TENANTID),
TRUE);
SMTPMail.Send;
MESSAGE(TestMailSuccessMsg,EmailAddress);
The above code is working fine when the smtp setup is rather than smtp.office365.com. But it is very strange to see if I replace the first "EmailAddress" by SMTPMailSetup."User ID" then it's working fine. but still JOB Queue notification is not working.
Kindly reply to solve this matter.
Thank youu,
Subrata Bauri