zehm / sendEmail

SendEmail is a lightweight, command line SMTP email client. If you have the need to send email from a command line, this free program is perfect: simple to use and feature rich. It was designed to be used in bash scripts, batch files, Perl programs and web sites, but is quite adaptable and will likely meet your requirements. SendEmail is written in Perl and is unique in that it requires NO MODULES. It has an intuitive and flexible set of command-line options, making it very easy to learn and use. SendEmail is licensed under the GNU GPL, either version 2 of the License or (at your option) any later version. [Supported Platforms: Linux, BSD, OS X, Windows 98, Windows NT, Windows 2000, & Windows XP]
GNU General Public License v2.0
33 stars 18 forks source link

SSL error sending to O365 #7

Open LatinSuD opened 1 year ago

LatinSuD commented 1 year ago

Hi, i got a few errors.

*******************************************************************
 Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
 is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
 possibly with SSL_ca_file|SSL_ca_path for verification.
 If you really don't want to verify the certificate and keep the
 connection open to Man-In-The-Middle attacks please set
 SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
  at /usr/local/bin/sendemail line 1906.
invalid SSL_version specified at /usr/share/perl5/vendor_perl/IO/Socket/SSL.pm line 444.

My workaround so far:

  1. Explicitely set SSL_verify_mode => SSL_VERIFY_NONE
  2. Remove "use stritct" mode.
  3. Remove SSL_version restrictions.
LatinSuD commented 1 year ago

Update, it was more like this around line 1911:

        use IO::Socket::SSL;;
        if (! IO::Socket::SSL->start_SSL($SERVER, SSL_verify_mode => int(IO::Socket::SSL::SSL_VERIFY_NONE))) {