APR Email Stability

Yes sir-re-re

So I set up a local SMTP service, and then ran a couple of tests.

624632 - If I pause the service, I receive an error and it shows a value of 1 in Activity. I was expecting the message would queue up. But I can work with this since it threw the error right away.

624633 - If I email the report by pressing the email button, I receive nothing in the ActivityMsg field even though it did send an email. Not a big deal since print routing engine is different

624634 - If I email the report using routing rule, the email delivery is shown in the ActivityMsg field. I think I can work with this.

One issue we have is that if too many are being processed, we can get errors in APM back from O365. I’m thinking maybe the SMTP relay server can be used to prevent this. Do you know if the local server can be used to queue up messages to slow them down on the way to O365?

I am going to defer to @EarlGrei he handled that part of it, but I know that the relay helped with the flood messaging in some way or another. Our exact config I’m not sure but it might be included in that experts corner post.

1 Like

But the InitiatorSource field can be used to determine if this was initialed by the email button vs a break route.

The following highlighted ones are from the Email button.

image

1 Like

Yes that makes sense, thanks

IIS should get a SMTP code back from O365 basically saying slow down, and it will do so. There are WAY more advanced methods of controlling mail flow like this that the IIS relay wont support, but at a basic level that should control the issues. Also using an authenticated relay has higher limits than even having APM ‘sign in’ to send its email.

Additionally just so I am clear you are sending roughly 1000 AR invoices via O365 a month? How much other email goes out using the same email account? (Oh and BTW you dont need a license for the relay method)

1 Like

The user pid will be listed as APR too.

Thanks for the information, I really appreciate it. There are a handful of AR invoice groups that vary in size (from 200-1500 invoices each) that get emailed on the last day of the month via O365 . I can not say for certain but I speculate there are around 20000 emails to and from the account monthly. We spoof the “From” sender email address but use one generic authenticated account for our system emails.

Also, just for a test, I tried running an invoice with a non deliverable email address: Tanner@gmailcom (no dot). APR shows that it emailed, so activity message is “Email: 1;”. I assume this means it was handed to the SMTP server. However, I do not see anything in O365 and did not receive an NDR. Do I just need to wait until it fails? That takes like 3 days on O365 doesn’t it?

Check the badmail directory? Also configure the NDR address.
image

I checked Badmail folder, nothing in there. I added my email address to the NDR parameter and tried to send another to the same address but still receive no feedback. Any other parameters I should be looking at for getting email feedback that cannot be sent because domain doesn’t exist (assuming gmailcom is an invalid domain).

Thanks again,
Tanner

Just for clarification you tested a successful email via the relay? Honestly I am surprised that the relay even accepted an email with no TLD at all. Try sending a test to something wild like lskdjfs@lskdhkwbnenlosdjnbsdf.com

Using that it appears to have worked:

I can also locate this in O365 message tracking. I wonder why the other email (Tanner@gmailcom) doesn’t give me any information back. I guess I’ll have to wait it out. Also might have to start using regular expressions on email address entry in epicor :frowning:

data directives are your friend here. if you are on 500 see if you can use EFx. if not create a small dll with your validation methods in it and bring it in as external reference

We are unfortunately on 10.2.300. What is EFx out of curiousity?

FWIW - Here’s a website with a “library” of RegEx expressions for validating an email address.

1 Like

EFx is the ability to create self contained libraries inside of Epicor then use them around the system. So say you want to create “MyValidationLib” you can do so, then add methods with params like “ValidEmail(string)” and have it return a value to you. You can then use that in other BPMs around the system. Let's Get Funcy - Epicor Functions

Since you are on 300 if you have a lot of place you want to validate emails create a library in visual studio and reference it in your BPMs so you can do inline something like

foreach(var tt in ttTable) {
 if(!MyValidationLib.ValidEmail(tt.EMailAddress))
 {
    throw new Ice.BLException("Invalid email ya moook");
 }
}
1 Like

Oh yeah, I’ve heard of them. It appears to be the only reason to upgrade from what I can see. I was hoping to learn more about them at Insights this year but I guess it will have to wait. Thanks for the ideas!

Depends on what you are looking for. I have hammered on Epicor hard to get fixes for Make-Direct WIP transactions that are starting to filter into 500.10+ so as soon as the BPM Form fix comes through in 500.16 we are going to 500. If you are already on 300 consider the jump to 500 we are heavily heavily customized and I think I have about 3 hours committed to fixes from 200.32 to 500.6 right now.