# Getting this error when attempting to execute and send a report

**URL:** <https://forum.inductiveautomation.com/t/getting-this-error-when-attempting-to-execute-and-send-a-report/18202>\
**Category:** Ignition\
**Created:** [May 29, 2018, 6:20pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-attempting-to-execute-and-send-a-report/18202 "2018-05-29T18:20:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harryzhou4498](https://avatars.discourse-cdn.com/v4/letter/h/71c47a/32.png) [@harryzhou4498](https://forum.inductiveautomation.com/u/harryzhou4498)\
**Post date:** [May 29, 2018, 6:20pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-attempting-to-execute-and-send-a-report/18202/1 "2018-05-29T18:20:30Z")

</div>

I’m not sure as to how exactly the smtp hostname is supposed to be configured. I have it currently set as [smtp.gmail.com](http://smtp.gmail.com), but I do not know if this is correct. Do I have to specify a specific email such as yahoo, gmail, etc or can I simply have mail.

```auto
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 25

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2055)

at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)

at javax.mail.Service.connect(Service.java:364)

at javax.mail.Service.connect(Service.java:245)

at javax.mail.Service.connect(Service.java:194)

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

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

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

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

at com.inductiveautomation.reporting.gateway.actions.EmailAction.perform(EmailAction.java:133)

at com.inductiveautomation.reporting.gateway.actions.EmailAction.perform(EmailAction.java:282)

at com.inductiveautomation.reporting.gateway.scripting.GatewayScriptingFunctions.executeAndDistribute(GatewayScriptingFunctions.java:326)

at com.inductiveautomation.reporting.gateway.ReportingGatewayHook$RPC.executeAndDistribute(ReportingGatewayHook.java:595)

at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.ModuleInvoke.invoke(ModuleInvoke.java:172)

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

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:85)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)

at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)

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

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)

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

Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

at sun.security.ssl.InputRecord.handleUnknownRecord(Unknown Source)

at sun.security.ssl.InputRecord.read(Unknown Source)

at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)

at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:543)

at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:348)

at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:236)

at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2019)

```

I’ve tried an alternate configuration with just [smtp.mail.com](http://smtp.mail.com) and received this error instead:

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/474c33b120926d98dccdda1f12ff7338c58a0b54.PNG)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 29, 2018, 7:02pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-attempting-to-execute-and-send-a-report/18202/2 "2018-05-29T19:02:03Z")

</div>

> [@harryzhou4498](#):
>
> I'm not sure as to how exactly the smtp hostname is supposed to be configured.

It would be your email provider. The server with the authority to send to the world using your "From" address. The details are provider specific.  
See this comment:

> [@Email notification](http://forum.inductiveautomation.com/t/email-notification/10806/2):
>
> Part of the difference will depend on what version of Ignition you’re running… In 7.7.x, you’re probably referring to the set up you can do when you make the email notification profile. This is where you set up the “constant” parts of the alarm notification like the hostname, port, etc. The Email Settings area in the Gateway (under Configuration) was originally added for the new Reporting module in 7.8.0. This lets you set up (and test) a SMTP server one time, and then use it by name in all yo…

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [May 29, 2018, 7:29pm UTC](https://forum.inductiveautomation.com/t/getting-this-error-when-attempting-to-execute-and-send-a-report/18202/3 "2018-05-29T19:29:02Z")

</div>

Port 25 doesn’t work with [smtp.gmail.com](http://smtp.gmail.com). Check the gmail docs at [https://support.google.com/a/answer/176600?hl=en](https://support.google.com/a/answer/176600?hl=en) – you need either port 465 or 587, depending on if you’re using SSL or TLS
