Email BPM randomly not working

A few months ago, our users started noticing that some of the email BPM’s didn’t fire, which lets order steps fall through the crack. I put myself on the Cc: list, and can confirm it’s not a user missing something in a spam folder. This was working fine for 3 years (10.0.700.4, 10.2.300, and now 10.2.500.9).

How can I troubleshoot?

I executed @hkeric.wci’s SQL script, but there were no records when I executed the query in SSMS. Then I ran it for just Ice.MailQueue, and did get 18 records (some ancient based on a user that hasn’t been here for 3 years, others I don’t know): BPM Emails not working all of a sudden

I like @gpayne’s suggestion to write to a log as well. When will that write to the log? I’m gun shy about filling up our database and running out of room.: https://www.epiusers.help/t/bpm-email-code-stopped-working/62528/11

Here is my super simple BPM:

image

image

image

image

Your ServerLog.txt in Server Epicor directory should show Mail Issues.

2 Likes

@Haso - Thanks! I’m looking into there now, but not quite sure how to find the needle in the 10Mb file haystack.

We have server logging enabled, and there is a new 10Mb file created every 20 minutes or so… If I search by the BPM Name ‘CSGHoldEmail’ then it shows every time the SO Update runs.

Suggestions on how to narrow it down to email? I searched the log file for my email address, but no dice (or maybe it’s not in that specific log file out of the last 10). Also searched for ‘SMTP’, with no luck.

Maybe we’ll need to start archiving our server logs - Currently they’re set to save 10 logs, and then it rolls over and overwrites. It saves about the last 1.5 hours of activity, but our users notice the issue a day later.

For my notes: How to look for issues track activity for Ice.Mail.SmtpMailer - #4 by hkeric.wci & BPM Logging - #2 by SAD

Check the app server shared folder, I thought that there are additional log files for other processes in one of those folders. For example when you the part bin qty fix thingy.

I know back in the day in E9 there was a separate SMTP log file that used to grow rather large and if you let it grow too big it would play havoc.

The other place to look is the actual windows event logs in the Epicor App server/task agent Node.

There bis also a KB on Epicare on cleaning up the systask tables, perhaps completed tasks are not bring purged, which might be contributing.

Check on your TA Log as well if you are doing async… If your Task Agent is running on the same AppServer as everything else then it would be just 1 App Server…

Look for

  • smtp
  • mail
  • outlook

Now this one is about parsing but I have a few where office365 replied with errors.

image

@askulte - you didn’t specify, but is your mail server on-prem, or O365 Exchange, or something else?

In our case, we had all outbound mail going through our Email Spam filtering service from IronPort. We were experiencing the same issue last year when I turned on a few BPMs like this + some SQL based email notifications + plus the Global Alerts (a :poop:-load of them) and we realized that outbound limits were in place preventing more than 100 emails per hour going ‘out’.

I don’t know your full situation, but I just wanted to put this out there as the ‘outside the box’ possibility.

@askulte it writes to the event viewer and to the serverlog.txt when the bpm fires. That gives you a date time stamp to begin the hunt. event viewer is in your time zone and serverlog is in UTC so you will need to convert.

To @MikeGross’s point about your server configuration. I am anonymous to an outbound appliance and see none of the smtp messages @hkeric.wci is showing, but I do see my diagnostics so I know the bpm ran. We used to use a login to O365, but one DMT run that updated thousands of parts I had an alert on got us sent to the 24 hour detention center with O365 so we changed to a connector.

Our IT guys can look on the appliance and in the O365 logs if I give them the time and email addresses involved.

@gpayne - We must of crossed each other in the intake/outtake hallway! LOL!!!

1 Like

The only reason I assume he is failing at the beginning (not even delivering to target) was because the AttemptCounter. I kind of excluded spam possiblities.
image

Hey @hkeric.wci

Is this the ServerLog.txt file, or is what you show from the Task Agent Log? My Task agent log in c:\ProgramData is empty - what setting do you have within the TaskAgent Service Config file to get the above level of logging?

Many Thanks!

Yes its the ServerLog.txt usually inside the IIS folder on the server.