send email after job queue is completed

NAS is working and job queue entries are successfully running, however email can’t be sent …

I managed to get it working to the point where email messages were created and get to the SEND statement:

When SMTP.Send is used (having the SMTP Setup done), i received the following error (though the email did get sent subseqently)

The SMTP mail system returned the following error: (0x80040213): The transport failed to connect to the server.

When cu 398 (Mail) NewMessage, it EXIT because of failing to log on at the line IF NOT OApplication.Logon (…) → logoff and exit, hence email didn’t get to the .SEND at all.

What is the best way to resolve this issue?

Have you checked your SMTP Setup ?

Check whether Is it blocking by some firewall or Antivirus

Seems like your NAS user is not authenticating to the SMTP server. Verify that it is authorized to use the SMTP server. or that SMTP does not require authentication.