How to look for issues track activity for Ice.Mail.SmtpMailer

I am wondering if epicor logs if an email was successfully process or not I tried to look at the event viewer but I couldn’t find any issues.

using (Ice.Mail.SmtpMailer smtpMailer = new Ice.Mail.SmtpMailer(currCompany))
{
try
{
smtpMailer.Send(message);
}
catch (SmtpFailedRecipientException ex)
{
CallContext.Current.ExceptionManager.AddBLException(string.Format(“There was an error while sending the email to {0}\n Error: {1}”, ex.InnerException, ex.Message), “ttResults”);
InfoMessage.Publish(string.Format(“There was an error while sending the email to {0}\n Error:{1}”, ex.InnerException, ex.Message));
}
catch(SmtpException ex)
{
CallContext.Current.ExceptionManager.AddBLException(string.Format(“There was an error while sending the email to {0}\n Error: {1}”, ex.InnerException , ex.Message), “ttResults”);
InfoMessage.Publish(string.Format(“There was an error while sending the email to {0}\n Error:{1}”, ex.InnerException, ex.Message));
}

            }
        }

I think there is a table like Ice.Mail.MailQueue that stores the mail item in queue, I’d imagine you could look there to see if you have some backlog of mail.
I’d also try catching your exception somewhere else vs. callcontext as that’s not abundantly visible

Thanks yeah I know about this table, I have a few records there but not sure how to empty them,it seems stuck and if i restart the server it doesn’t get clean up :rofl:

I thought I could find something on the server logs.

If you enable Server Logs via your Admin Console then in your Epicor IIS Folder will be a ServerLog.txt it will have more details if its SMTP Related.

If your Task Agent runs on a different AppServer make sure you enable logs there, it will be wherever the Task Agent runs on.

Example:
image
image

Thanks a lot i’ll try that