<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Strange SMTP errors]]></title><description><![CDATA[<p dir="auto">Hey Guys, I've had a production system in place for a few years now with no issues. Lately the system hasn't been sending email reports / notifications etc.</p>
<p dir="auto">I've checked the log and found the following...</p>
<pre><code>WARN  2018-04-09 11:45:43,852 (com.serotonin.m2m2.rt.maint.work.EmailWorkItem.execute:86) - Error sending email
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: in-v3.mailjet.com, port: 465, response: -1. Failed messages: javax.mail.MessagingException: Could not connect to SMTP host: in-v3.mailjet.com, port: 465, response: -1; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Could not connect to SMTP host: in-v3.mailjet.com, port: 465, response: -1

</code></pre>
<p dir="auto">I've tried the other ports such as 25, 587 TLS on/off etc, and all the same errors.<br />
I can ping the hosts, I've also tried just IP Address.<br />
Maybe something is not working with the way Java connects to these hosts?</p>
<p dir="auto">Cheers<br />
Dan</p>
]]></description><link>https://forum.mango-os.com/topic/3394/strange-smtp-errors</link><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 05:35:39 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/3394.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Apr 2018 01:47:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Strange SMTP errors on Wed, 11 Apr 2018 18:03:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> said in <a href="/post/17976">Strange SMTP errors</a>:</p>
<blockquote>
<p dir="auto">OK, I think I've resolved it, managed to remove all the settings, add them all in again using port 587, TLS with mailjet and it's working.</p>
<p dir="auto">Thanks for your assistance :)</p>
<p dir="auto">Cheers<br />
Dan</p>
</blockquote>
<p dir="auto">Great, glad you got it working.</p>
]]></description><link>https://forum.mango-os.com/post/17995</link><guid isPermaLink="true">https://forum.mango-os.com/post/17995</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Wed, 11 Apr 2018 18:03:23 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 23:59:07 GMT]]></title><description><![CDATA[<p dir="auto">OK, I think I've resolved it, managed to remove all the settings, add them all in again using port 587, TLS with mailjet and it's working.</p>
<p dir="auto">Thanks for your assistance :)</p>
<p dir="auto">Cheers<br />
Dan</p>
]]></description><link>https://forum.mango-os.com/post/17976</link><guid isPermaLink="true">https://forum.mango-os.com/post/17976</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 10 Apr 2018 23:59:07 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 23:36:26 GMT]]></title><description><![CDATA[<p dir="auto">I've even tried using localhost as the mail server and tailed the log...</p>
<pre><code>Apr 11 09:36:04 water postfix/smtpd[9329]: connect from localhost[127.0.0.1]
Apr 11 09:36:11 water postfix/smtpd[9329]: lost connection after HELO from localhost[127.0.0.1]
Apr 11 09:36:11 water postfix/smtpd[9329]: disconnect from localhost[127.0.0.1]
</code></pre>
<p dir="auto">It appears that the HELO part is failing. This seems to be related to the hostname, I haven't changed this that I'm aware of however :-/</p>
<pre><code>WARN  2018-04-11 09:36:04,555 (com.serotonin.m2m2.rt.maint.work.EmailWorkItem.execute:86) - Error sending email
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: 501 Syntax: HELO hostname
. Failed messages: javax.mail.MessagingException: 501 Syntax: HELO hostname
; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: 501 Syntax: HELO hostname

</code></pre>
]]></description><link>https://forum.mango-os.com/post/17975</link><guid isPermaLink="true">https://forum.mango-os.com/post/17975</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 10 Apr 2018 23:36:26 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 23:08:16 GMT]]></title><description><![CDATA[<p dir="auto">This is running on one of those MangoES solid state bad boys. It's been super reliable.</p>
<pre><code>root@water:~# java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b111)
Java HotSpot(TM) Client VM (build 25.0-b53, mixed mode)

</code></pre>
]]></description><link>https://forum.mango-os.com/post/17974</link><guid isPermaLink="true">https://forum.mango-os.com/post/17974</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 10 Apr 2018 23:08:16 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 15:47:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> said in <a href="/post/17950">Strange SMTP errors</a>:</p>
<blockquote>
<p dir="auto">I've tried multiple SMTP providers.<br />
Is the SMTP client using a Java library or something you guys wrote?</p>
</blockquote>
<p dir="auto">We use the Spring class <code>org.springframework.mail.javamail.JavaMailSenderImpl</code> to send the emails, it is a simple wrapper around the Java <code>javax.mail.*</code> interfaces.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> said in <a href="/post/17952">Strange SMTP errors</a>:</p>
<blockquote>
<p dir="auto">the other thing I wondered was, is there a timeout for connection?</p>
</blockquote>
<p dir="auto">We do not set a timeout, it would be the default (according to <a href="https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html" rel="nofollow ugc">https://javaee.github.io/javamail/docs/api/com/sun/mail/smtp/package-summary.html</a> that means its infinite).</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> said in <a href="/post/17952">Strange SMTP errors</a>:</p>
<blockquote>
<p dir="auto">it appears to connect from shell.</p>
</blockquote>
<p dir="auto">On the same machine that Mango is running on? Have you checked the firewalls etc?</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> said in <a href="/post/17953">Strange SMTP errors</a>:</p>
<blockquote>
<p dir="auto">Do you know if there is a limit on length of password in the java client?</p>
</blockquote>
<p dir="auto">There is no limit.</p>
<p dir="auto">Are you using TLS? Maybe its now required or something? What JRE are you using?</p>
]]></description><link>https://forum.mango-os.com/post/17962</link><guid isPermaLink="true">https://forum.mango-os.com/post/17962</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Tue, 10 Apr 2018 15:47:52 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 05:11:44 GMT]]></title><description><![CDATA[<p dir="auto">one more thing, the SMTP server mailjet uses quite a long password (hash)<br />
Do you know if there is a limit on length of password in the java client?</p>
]]></description><link>https://forum.mango-os.com/post/17953</link><guid isPermaLink="true">https://forum.mango-os.com/post/17953</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 10 Apr 2018 05:11:44 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Tue, 10 Apr 2018 02:15:35 GMT]]></title><description><![CDATA[<p dir="auto">the other thing I wondered was, is there a timeout for connection? This connection is now on a satellite link, so latency is  &lt;&gt; 800ms</p>
<pre><code>root@water:~# ping in-v3.mailjet.com
PING in.mailjet.com (104.199.96.85) 56(84) bytes of data.
64 bytes from 85.96.199.104.bc.googleusercontent.com (104.199.96.85): icmp_seq=1 ttl=41 time=900 ms
64 bytes from 85.96.199.104.bc.googleusercontent.com (104.199.96.85): icmp_seq=2 ttl=41 time=871 ms
64 bytes from 85.96.199.104.bc.googleusercontent.com (104.199.96.85): icmp_seq=3 ttl=41 time=862 ms
^C
--- in.mailjet.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 2998ms
rtt min/avg/max/mdev = 862.077/878.014/900.703/16.511 ms
root@water:~# telnet in-v3.mailjet.com 465
Trying 104.199.96.85...
Connected to in.mailjet.com.
Escape character is '^]'.
</code></pre>
<p dir="auto">it appears to connect from shell.</p>
]]></description><link>https://forum.mango-os.com/post/17952</link><guid isPermaLink="true">https://forum.mango-os.com/post/17952</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Tue, 10 Apr 2018 02:15:35 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Mon, 09 Apr 2018 23:29:24 GMT]]></title><description><![CDATA[<p dir="auto">I've tried multiple SMTP providers.<br />
Is the SMTP client using a Java library or something you guys wrote?</p>
]]></description><link>https://forum.mango-os.com/post/17950</link><guid isPermaLink="true">https://forum.mango-os.com/post/17950</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Mon, 09 Apr 2018 23:29:24 GMT</pubDate></item><item><title><![CDATA[Reply to Strange SMTP errors on Mon, 09 Apr 2018 16:29:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan" aria-label="Profile: dan">@<bdi>dan</bdi></a> Definitely just looks like it can't connect, pinging just means the host is up, it doesn't indicate that port 465 is open. Check your SMTP provider hasn't changed their hostname, ports, configuration options etc.</p>
]]></description><link>https://forum.mango-os.com/post/17937</link><guid isPermaLink="true">https://forum.mango-os.com/post/17937</guid><dc:creator><![CDATA[Jared Wiltshire]]></dc:creator><pubDate>Mon, 09 Apr 2018 16:29:10 GMT</pubDate></item></channel></rss>