Email - Test company config

So in looking at the .r file, it is referencing a custom SendEmail.i file that runs the ‘Bpm/BpmEmail.p’ program. Is the BpmEmail.p program a standard Epicor program? If so, then shouldn’t disabling the Global Alerts server email process not be sending these emails out?

Since this file is calling it directly OUTSIDE of an Epicor process, it just runs and doesn’t care if you’ve disabled alerts or anything else (this is the issue with calling external processes, it’s REALLY HARD to trace certain things down after the fact).

To disable this process, you need to make Epicor not call this ReceiveAction file… by either disabling the BPM or removing the Action process.

Which file is calling an outside external process? If the SendEmai.i is the outside process, doesn’t it reference back to an internal Epicor process using the BpmEmail.p process? What is the external process that could be calling directly to the smtp server directly outside of Epicor?

The servers OS is capable of sending an email with minimal information.

$EmailFrom = “yourgmailadress@gmail.com”
$EmailTo = “destination@somedomain.com”
$Subject = “The subject of your email”
$Body = “What do you want your email to say”
$SMTPServer = “smtp.gmail.com”
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“usr”, “pass”);
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

That’s all that’s needed to send an email from a command prompt.

Now like you said, I’d have though the $SMTPServer and port number would have come from the Epicor App, but who knows.

See the example at https://www.howtogeek.com/120011/stupid-geek-tricks-how-to-send-email-from-the-command-line-in-windows-without-extra-software/

The sendmail script is doing the actual emailing. It is not submitting it to the Epicor BPM email process, most like the BPM Email Process is calling this sendmail script.

Mark W.

Even if the SendEmail.i script is doing the emailing, the script is calling a standard Epicor process, ‘Run Bpm/BpmEmail.p’ program. How does the BpmEmail.p program work if it is triggered by the Global Alerts server process being enabled?

What is the directory that the calling BPM is in?

Do you know the PROPATH for your TEST environment?

Mark W.

The directory is: \Epicor905\Server\Bpm

Below is the ProPath:
E:\Epicor Software\Epicor905\custom\Viracon,E:\Epicor Software\Epicor905\bpmExec\PilotBPM,E:\Epicor Software\Epicor905\CSG\Pilot\server,E:\Epicor Software\Epicor905\CSG\Pilot,E:\Epicor Software\Epicor905\Server,E:\Epicor Software\Epicor905

ReceiveAction.p is in \Epicor905\Server\Bpm?

No, that is a custom program in the BPMExec location.

Once that custom program has been called, Epicor is done with it and it does whatever it is written to do. Epicor just said “go do your thing”. If the sendmail piece is in there, it is now completely independent of Epicor. Again, this is why external processes are the bane of our existence…

What’s confusing is that the SendEmail.i program calls out a standard Epicor BpmEmail.p process as the end process to send the email. So the process is Custom .p > Custom .i > Standard BpmEmail.p steps. It isn’t until the BpmEmail.p process that it sends out the email using standard Epicor email process…if that’s how I’m reading the custom programs and calls.

Where are all the ReceiveAction.p files? Is there one in E:\Epicor Software\Epicor905\bpmExec\PilotBPM?

It isn’t until the BpmEmail.p process that it sends out the email using standard Epicor email process

Here’s the confusion. It’s not the standard Epicor email process. It is short-cutting that process and sending the email directly.

If you want to prevent this from happening in Pilot, disable that BPM. If the ActionReveive.p is in one of the CSG folders in Pilot, you’ll want to remove it from there. OR, if you’re comforatable, put an if statement around the sendmail command and only call it for the live environment.

Mark W.

This is what we’re trying to find out how the customization is short cutting the process and hitting the smtp directly. What’s the advantage of doing this versus using Epicor’s standard email process? If that is the case, we’ll need to disable the BPM and not just the Global Alerts email process.

Correct.

This thread is the closest thing I have found for a similar angle.
Rather than preventing email from the test system, we would like email to be sent, just never able to be delivered or relayed to the customer/vendor/user email addresses… an email sandbox with no escape.
We set up an smtp server inhouse and prevented external internet access. Two accounts were set up, the same named sending address (alias) “DoNotReply@xxxxx.com” as our live environment has the same account name (DoNotReply) but, the smtp server address is different.
We wanted to have all mail flow to this server and simply not be deliverable due to lack of internet connectivity and we set up an internal forwarding rule so that all sent to addresses get a copy forwarded to the account named “Forward” on the sandbox smtp server.
This is a Nethserver Linux box with an smtp server running, webmail face etc. But I cannot get the Epicor system to connect to the sandboxed server. I think it may have some sort of limitation with SMTP Auth etc from what I have read on this thread and links within. Just cannot seem to enable the sending of mail to it.
Tried every port option (25, 465, 587) with every combination of SSL checked/unchecked, and the user account that does work and allows login and sending of email with its credential independent of the Epicor server with appropriate info in Company Maintenance fields.
Does Epicor somehow assume or use a specific authentication protocol that might not be available to the Linux Nethserver? Any under the skin info on what Epicor does with the credential and what it expects in negotiations with an smtp server would be greatly appreciated!

Hey Henry,

I use hMailServer which is a free/open source mail server for Windows. I configure it for the local domain (erp.local) and create one email address (epicor@erp.local) and then use Thunderbird to read the mail. The Company Maintenance looks like this:

Thanks Mark! I appreciate having another option!
I will check it out if I cannot get this existing solution working.
I would really like to understand why I cannot seem to authenticate to the current smtp server we have. It is all set to go and has a nice little Roundcube webmail app so that developers and testers can access it super easily.
Epicor uses a .NET system class that works as a basic SMTP client, I think.
I found this very helpful article on SMTP authentication and history ( SMTP AUTH: SMTP authentication | the right protocol against spam - IONOS ) but it begs the question: Does anyone know what authentication mechanisms does Epicor support? That seems to be the failure point, but I cannot find any logging that might reveal this authentication negotiation in any detail.

1 Like

All the authentication options are listed on the Company Maintenance | Email tab. You can do anonymous or not, TLS or not, and you can choose the SMTP port number. Between those three, you should be able to set it up to your test email system’s requirements.

I’m sorry, I meant what authentications were supported from the range available within SMTP servers… from the article I included. I wasn’t very clear on that, my apologies.
Authentication methods include:
PLAIN, LOGIN, CRAM-MD5, GSSAPI, DIGEST-MD5, MD5, OAUTH10A, OAUTHEBEARER, SCRAM-SHA-1, and [NTLM]

I was trying to figure out what method the Neth server we set up is using by default and why the more simple methods listed in this article and seem to be what Epicor might be using aren’t working (yet!) I was looking for background on what the Epicor .NET client is using or could use so that I could perhaps force that method on the Neth server (which is entirely new to me, as is the whole SMTP authenication topic really)

1 Like