SMTP Mail error(The SMTP mail system returned the following error:(0x8004020E).

Dear All,

Please i need on SMTP mail sending functionality. i have setup the following details in the SMTP table.




On the form 42 and in the command button i have written following code



SMTP.CreateMessage(‘Sameer Virmani’,SMTPSETUP.“User ID”,‘’,‘How are you’,‘Hi’,TRUE);


MESSAGE(‘Mail Send’);

Codeunit used is 400

I am trying to send the mail and it returns me the following error.

“The SMTP mail system returned the following error: (0x80044020E):the server rejected the sender address.The server response was 530 5.7.0 Must issue a STARTTLS command first.f1sm13743057wiy.2”

Would appreciate your help i have tried so many places to find the solution but the error remains

Did you check this?

Gmail will not work the standard codeunit of Navision

You need to use CDO