Send Email function

I’m having issues with the “Send Email” function within the application.
image
When I attempt to send an email with attachment via the UI or via Advanced Print Routing, the operation times out. Below is the error text from the task agent, in this case from when it fails when attempting to run via APR.
They both fail at the “EmailSender.Send” Method…

Thanks in advance if anyone has insight

Epicor10DEV: An error occurred trying to run task ID 252508 for agent SystemTaskAgent on the application server (User: amoreng, Task Description: AR Invoice Form).
Error Detail:
Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: The operation has timed out.
Stack Trace:
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at Ice.Core.SsrsReporting.EmailSender.Send(EmailActionSettings settings, IEnumerable1 attachmentInfos) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\SsrsReporting\EmailSender.cs:line 27 at Ice.Core.RoutingAndBreaking.EmailReportAction.EmailReportsFromReportRequests() in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\EmailReportAction.cs:line 261 at Ice.Core.RoutingAndBreaking.EmailReportAction.HandleProcess(Object sender, ProcessEventArgs e) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\EmailReportAction.cs:line 166 at Ice.Core.RoutingAndBreaking.BaseNode.OnProcess(ProcessEventArgs e) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\BaseNode.cs:line 172 at Ice.Core.RoutingAndBreaking.BaseNode.OnProcess(ProcessEventArgs e) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\BaseNode.cs:line 172 at Ice.Core.RoutingAndBreaking.BaseNode.OnProcess(ProcessEventArgs e) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\BaseNode.cs:line 172 at Ice.Core.RoutingAndBreaking.Workflow.OnProcess(ProcessEventArgs e) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\Workflow.cs:line 209 at Ice.Core.RoutingAndBreaking.Workflow.Run(ReportInstanceInformation reportInstance) in C:\_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RoutingAndBreaking\Workflow.cs:line 153 at Ice.Core.RptBase.ReportSsrsDatabaseBuilder.RouteAndBreakReport(Func2 executeCommand, Func`2 executeReader, SqlObjectsCreated sqlObjectsCreated) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RptBase\ReportSsrsDatabaseBuilder.cs:line 334
at Ice.Core.RptBase.ReportDatabaseBuilder.XMLClose() in C:_Releases\ICE\RL3.2.200.0\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDatabaseBuilder.cs:line 93
at Erp.Internal.AR.ARInvForm.RunProcess(Int64 instanceTaskNum, String outputFileName) in c:_Releases\ERP\RL10.2.200.0\Source\Server\Internal\AR\ARInvForm\ARInvForm.cs:line 1264
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_Releases\ICE\RL3.2.200.0\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 98
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_Releases\ICE\RL3.2.200.0\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 57
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\RL3.2.200.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 547

Did emailing from the app used to work and now doesnt? Or is this the first time trying to use it?

First time using it

Did you make all the settings (smtp url, authentication, etc …) in Company Maint or Config?

To my best ability yes. It’s using the office 365 settings that I use in other apps without issue

Your Office360 authenticates with the mail server using your windows login credentials. The E10 app doesnt/cant authenticate. The SMTP server must be setup to allow anonymous messaging. The IT people can implement some security by only allowing anonymous messages from particular IP addresses (the E10 app server computer)

1 Like

That’s got to be it. I’ll talk to my sys admin tomorrow and see what we can do,thank you

Here’s a link to an article about sending email from a command line. You could try sending from the command prompt (on the app server), without any authentication (no pass word set) to see if your smtp server allows it

Edit: it helps to include the link

1 Like

I’m positive that my sys admin knows how to do this, but I’m curious; do I need to use a local smtp for the app config rather than 365? I use the 365 stuff for client side generated emails out of epicor but those aren’t anonymous. It sounds like I need to use an smtp that allows anonymous auth and that would be more of a local smtp on the app or db server correct?

I’m no expert on this stuff (I only know enough to be really really dangerous)…

But what I recall from when we set E10 up (and what I can as the settings now), we ended up only having to set fields on “Global Alert” From and “SMTP” (both on the Email and Routing tab in Company Maintenance)

image

image

We did not need to setup an exchange account for our no-reply@domain.com address. And don’t require authentication.

As for your question, I believe that emails created in E10 (both using the email Icon for report output, and in Advanced printing) always go through the E10 system.

FWIW - we have the Advanced Printing (the one that has the Break Routing) and have several automated emails. Some are user initiated (selecting a specific Report Style that sends emails via Break Routing), and others that fire off at a particular time of day.

1 Like

Let my try this out tomorrow and I’ll mark this solved after I document it thanks again