Invalid email addresses error?

Part of my application is emailing out invoices. Today and yesterday apparently the emails have been not sending.

I see the following in my logs

javax.mail.SendFailedException: Invalid Addresses

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1949)

at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1195)

at javax.mail.Transport.send0(Transport.java:254)

at javax.mail.Transport.send(Transport.java:124)

at com.inductiveautomation.ignition.gateway.smtp.SmtpManagerImpl.sendMailWithRetries(SmtpManagerImpl.java:239)

at com.inductiveautomation.ignition.gateway.smtp.SmtpManagerImpl.sendEmail(SmtpManagerImpl.java:206)

at com.inductiveautomation.ignition.gateway.servlets.Gateway.sendEmail(Gateway.java:1221)

at com.inductiveautomation.ignition.gateway.servlets.Gateway.doPost(Gateway.java:478)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at com.inductiveautomation.ignition.gateway.bootstrap.MapServlet.service(MapServlet.java:86)

at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1391)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)

at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)

at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)

at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:59)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)

at org.eclipse.jetty.server.Server.handle(Server.java:500)

at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)

at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)

at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)

at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)

at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)

at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)

at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 452 4.5.3 Too many recipients ATTR48 [MW2NAM12FT038.eop-nam12.prod.protection.outlook.com]

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1816)

... 48 common frames omitted

Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 452 4.5.3 Too many recipients ATTR48 [MW2NAM12FT038.eop-nam12.prod.protection.outlook.com]

And beneath that two logs leading up to it - first one

Trying to send email 'Invoice #5100-2022-1-6, Computer Support - 2021-10-29 thru 2022-03-13 plus hardware' to [someone@someCompany.com, ealter@primarysys.com, kcampo@primarysys.com] failed. Please correct the problem and try again.

Followed by

Sending email Invoice #5100-2022-1-6, Computer Support - 2021-10-29 thru 2022-03-13 plus hardware to address(es) [someone@someCompany.com, ealter@primarysys.com, kcampo@primarysys.com] failed. Will retry 0 more time(s).

I know all three of those email addresses are valid - ealter and kcampo are emails within my company (for which I have credentials in the gateway, not that should matter - but ealter is the sender here). And someone@someCompany.com, changed for privacy, I emailed them directly just last week (through outlook, not through Ignition).

So I am at a loss as to what is causing these errors - the past two days no emails have gone out (not just for someone@someCompany.com, but other customer emails known to be valid from direct communications via outlook and not Ignition based).

Any ideas as to what is going wrong?

Are there only the 3 recipients on the message? Seems odd to be getting:

Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 452 4.5.3 Too many recipients ATTR48 [MW2NAM12FT038.eop-nam12.prod.protection.outlook.com]

For only 3 addresses.

Without seeing the actual TO address, it is hard to tell. But the RFC for email addresses is pretty strict, and not tolerant of international characters. Most email clients will encode otherwise non-compliant addresses automatically. Use “view source” on one of those emails to see the “real” address. I bet it is encoded.

Yes only three addresses, a customer, and then two employees here get a copy.

To @lrose’ point : maybe your SMTP server doesn’t “like” sending an outbound mail (from Ignition) to someone outside of your domain now, due to an IT restriction?

Yea apparently IT did change something recently. Talking with them now. Seems to be something on the Outlook side of things. It thinks things are spam when they are not. Will post an answer when it’s figured out.

2 Likes

Perhaps this will help?

1 Like

I tested sending emails out directly from the gateway page and within our company domain it worked but going out to any other domain, even something like gmail, was throwing a Relay Access Denied Error.

Found this related to it

IT took care of it so I can’t give list out the exact trouble shooting steps they took.

However, to any future viewers of this post, I would recommend doing some email testing from within your gateway page and check - does outgoing work for other people in your domain? Does it work for people on a different domain? And go from there.

1 Like

You really are at IT’s mercy in this kind of situation. As an example, i had a long standing issue where some emails would randomly just not be delivered. No error, they just went into the void. Turns out they imposed a limit on how many emails could go out per an arbitrary time interval.

2 Likes