Hello,

I have recently installed my new computer with Windows 8.1 Pro (x64) in a Windows domain with Strawberry Perl 5.22.0 (with all the updates for Email::* packages)

I cannot connect to my SMTP server anymore (with SSL). I have the same problem on a Windows 7 Pro (x64) computer in the same domain.

I used to use ChilKat e-mail on the Windows 7 computer with Strawberry 5.16, but for some reason the perl interpreter crashes now on both computers (with Strawberry 5.16 or newer).

UPDATE: The code below works in fact on Windows 7 computer with Strawberry Perl 5.16.2 ...

Here is the code (of course, I have replaced some sensitive data :) ):
#!/usr/bin/perl use strict; use warnings; use Email::Sender::Simple qw(sendmail); use Email::Sender::Transport::SMTPS; use Email::Simple::Creator; my $transport = Email::Sender::Transport::SMTPS->new( host => '192.168.130.22', port => 465, ssl => 'ssl', sasl_username => 'me', sasl_password => 'mypasswd', debug => 1 ); my $message = Email::Simple->create( header => [ From => 'Me <me@me.com>', To => 'Me <me@me.com>', Subject => "Simple Test", ], body => "Simple test body", ); try { sendmail($message, { transport => $transport }); } catch { die "Error sending email: $_"; };
The output is this:
W:\Development\Eclipse\FIM Send UE Data Status>perl SimpleMail.pl Net::SMTPS>>> Net::SMTPS(0.04) Net::SMTPS>>> IO::Socket::INET6(2.72) Net::SMTPS>>> IO::Socket(1.38) Net::SMTPS>>> IO::Handle(1.35) Net::SMTPS>>> Exporter(5.72) Net::SMTPS>>> Net::SMTP(3.06) Net::SMTPS>>> Net::Cmd(3.06) Net::SMTPS>>> IO::Socket::IP(0.37) DEBUG: .../lib/Net/SMTPS.pm:136: global error: Socket has no fileno unable to establish SMTP connection Trace begun at C:\Strawberry\perl\site\lib\Email\Sender\Transport\SMTP +S.pm line 98 Email::Sender::Transport::SMTPS::_throw('Email::Sender::Transport::SMT +PS=HASH(0x5bc488)', 'unable to establish SMTP connection') called at +C:\Strawberry\perl\site\lib\Email\Sender\Transport\SMTPS.pm line 60 Email::Sender::Transport::SMTPS::_smtp_client('Email::Sender::Transpor +t::SMTPS=HASH(0x5bc488)') called at C:\Strawberry\perl\site\lib\Email +\Sender\Transport\SMTPS.pm line 107 Email::Sender::Transport::SMTPS::send_email('Email::Sender::Transport: +:SMTPS=HASH(0x5bc488)', 'Email::Abstract=ARRAY(0x494ce8)', 'HASH(0x2c +52658)') called at C:\Strawberry\perl\vendor\lib\Email\Sender\Role\Co +mmonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at C:\Strawberry\perl\v +endor\lib\Try\Tiny.pm line 77 eval {...} at C:\Strawberry\perl\vendor\lib\Try\Tiny.pm line 72 Try::Tiny::try('CODE(0x2e50960)', 'Try::Tiny::Catch=REF(0x2e3af40)') c +alled at C:\Strawberry\perl\vendor\lib\Email\Sender\Role\CommonSendin +g.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Transport::SM +TPS=HASH(0x5bc488)', 'Email::Abstract=ARRAY(0x494ce8)', 'HASH(0x2e507 +c8)') called at C:\Strawberry\perl\vendor\lib\Email\Sender\Simple.pm +line 119 Email::Sender::Simple::send_email('Email::Sender::Simple', 'Email::Abs +tract=ARRAY(0x494ce8)', 'HASH(0x2c54358)') called at C:\Strawberry\pe +rl\vendor\lib\Email\Sender\Role\CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at C:\Strawberry\perl\v +endor\lib\Try\Tiny.pm line 77 eval {...} at C:\Strawberry\perl\vendor\lib\Try\Tiny.pm line 72 Try::Tiny::try('CODE(0x2c52688)', 'Try::Tiny::Catch=REF(0x2c2af30)') c +alled at C:\Strawberry\perl\vendor\lib\Email\Sender\Role\CommonSendin +g.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Simple', 'Ema +il::Simple=HASH(0x2c526d0)', 'HASH(0x2c4ec30)') called at C:\Strawber +ry\perl\vendor\lib\Sub\Exporter\Util.pm line 18 Sub::Exporter::Util::__ANON__('Email::Simple=HASH(0x2c526d0)', 'HASH(0 +x2c4ec30)') called at SimpleMail.pl line 29
Can anybody help me understand where the problem might be? Thank you in advance!

In reply to Cannot connect to SMTP Server from Windows 8.1 Pro x64 by sursan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.