title: Sendemail on Linux Debian Wheezy gives errors on gmail and gmx accounts
body: <p>I am using the SendEmail SMTP client (<a href="http://caspian.dotconf.net/menu/Software/SendEmail/" rel="nofollow">http://caspian.dotconf.net/menu/Software/SendEmail/</a>) on a Beaglebone black running the Debian Wheezy Linux distro.</p>
  
  <p>This tool is exactly what I need but I am having a few problems with it. Bear in mind that I am a Linux Newbie.</p>
  
  <p>Firstly, the latest SendEmail package for Debian Wheezy is 1.56-2 (<a href="https://packages.debian.org/source/wheezy/sendemail" rel="nofollow">https://packages.debian.org/source/wheezy/sendemail</a>).  A later package (1.56-5) is available for other Debian distros (e.g. Sid/Jessie) but not for Wheezy.  Anyone know why this is?</p>
  
  <p>I have also using libio-socket-ssl-perl 1.76-2,  libnet-ssleay-per 1.48-1+b1, perl 5.14.2-21+deb7u2.</p>
  
  <p>Secondly, I am testing using GMAIL and GMX accounts on ports 465 and 587.  Note that I have tested these using a different OS (not Linux) with my own SMTP client with PolarSLL and the accounts all work OK.  </p>
  
  <p>However, they do not seem to work when using SendEmail on Linux Debian Wheezy.  The problems I am having are:</p>
  
  <pre><code>GMAIL port 587 (STARTTLS)  FAILS:
  Jun 12 10:39:55 beaglebone sendEmail[3686]: DEBUG =&gt; My IP address is: 192.168.1.224
  Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS =&gt; Received:        220 mx.google.com ESMTP ha4sm2142303wib.0 - gsmtp
  Jun 12 10:39:55 beaglebone sendEmail[3686]: INFO =&gt; Sending:    EHLO beaglebone
  Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS =&gt; Received:        250-mx.google.com at your service, [92.19.250.250], 250-SIZE 35882577, 250-8BITMIME, 250-STARTTLS, 250-ENHANCEDSTATUSCODES, 250-PIPELINING, 250-CHUNKING, 250 SMTPUTF8
  Jun 12 10:39:55 beaglebone sendEmail[3686]: INFO =&gt; Sending:    STARTTLS
  Jun 12 10:39:55 beaglebone sendEmail[3686]: SUCCESS =&gt; Received:        220 2.0.0 Ready to start TLS
  invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332
  </code></pre>
  
  <p>Various forums mention that the fix/workaround for this is to change line 1490 in "SSL.pm"</p>
  
  <p>from</p>
  
  <pre><code>m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i
  </code></pre>
  
  <p>to</p>
  
  <pre><code>m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i
  </code></pre>
  
  <p>This does fix the problem. Perhaps this fix is not required if 1.56-5 was available for Wheezy?</p>
  
  <p>The following accounts give the same results regardless of whether the above fix is implemented or not.</p>
  
  <pre><code>GMAIL port 465 (SSL) FAILS:
  Jun 12 10:32:43 beaglebone sendEmail[3537]: DEBUG =&gt; Connecting to smtp.gmail.com:465
  Jun 12 10:32:43 beaglebone sendEmail[3537]: DEBUG =&gt; My IP address is: 192.168.1.224
  Jun 12 10:33:43 beaglebone sendEmail[3537]: ERROR =&gt; Timeout while reading from smtp.gmail.com:465 There was no response after 60 seconds.
  
  GMX port 587 (STARTTLS)  FAILS:
  Jun 12 10:35:12 beaglebone sendEmail[3586]: DEBUG =&gt; Connecting to mail.gmx.com:587
  Jun 12 10:35:13 beaglebone sendEmail[3586]: DEBUG =&gt; My IP address is: 192.168.1.224
  Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS =&gt; Received:        220 gmx.com (mrgmx103) Nemesis ESMTP Service ready
  Jun 12 10:35:13 beaglebone sendEmail[3586]: INFO =&gt; Sending:    EHLO beaglebone
  Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS =&gt; Received:        250-gmx.com Hello beaglebone [92.19.250.250], 250-SIZE 69920427, 250-AUTH LOGIN PLAIN, 250 STARTTLS
  Jun 12 10:35:13 beaglebone sendEmail[3586]: INFO =&gt; Sending:    STARTTLS
  Jun 12 10:35:13 beaglebone sendEmail[3586]: SUCCESS =&gt; Received:        220 OK
  Jun 12 10:35:13 beaglebone sendEmail[3586]: ERROR =&gt; TLS setup failed: SSL connect attempt failed with unknown error error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
  
  GMX port 465 (SSL) FAILS:
  Jun 12 10:36:23 beaglebone sendEmail[3619]: DEBUG =&gt; Connecting to mail.gmx.com:465
  Jun 12 10:36:23 beaglebone sendEmail[3619]: DEBUG =&gt; My IP address is: 192.168.1.224
  Jun 12 10:36:33 beaglebone sendEmail[3619]: ERROR =&gt; mail.gmx.com:465 returned a zero byte response to our query.
  </code></pre>
  
  <p>Can anyone help?</p>
  
  <p>Thanks</p>