Hi all
I have a job running through som sub-jobs (among other, posting invoices) and at the end it calls a codeunit sending an e-mail with invoice as PDF-attachm.
If internet connection is lost all jobs has been done, but the mail is missing.
How do I check whether I have connection to the SMTP server before running the jobs rather than having the server-fault at the end?
0
Answers
You can create a .Net or Automation to open STMP port on the server to check if its running but this can't ensure the mails are sent.
If the connection to SMTP server fails at the middle of the jobs you will send only some emails.
My suggestion is to buffer the mails to a table and have another job that send the emails.
Regards,
parm