Getting this error when attempting to execute and send a report

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, 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.

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 and received this error instead:

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:

Port 25 doesn’t work with smtp.gmail.com. Check the gmail docs at 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