in reply to Error at during DATA / Email::Sender::Transport::SMTP

Outlook is a client, not a mail server. Is this happening for a particular recipient? If so are there any 'special' characters in their email address or name? Can you show the code rather than the error message?

  • Comment on Re: Error at during DATA / Email::Sender::Transport::SMTP

Replies are listed 'Best First'.
Re^2: Error at during DATA / Email::Sender::Transport::SMTP
by talexb (Chancellor) on Jun 14, 2024 at 16:51 UTC

    Sorry -- I'm using smtp.office365.com, port 587 as the SMTP server .. I think of that as Outlook.

    I'm generating a report by sending a bunch of query results to Template::Toolkit process, then I'm sending the result. I just did a test run, and the output file (a web page) was 835K, so not huge. This is the code that sends the message, using ymd as the date and output as the output from the TT2 process:

      my $message = Email::Simple::Markdown->create( header => [ Subject => "Sage IC Issues to be fixed / $ymd", To => $list, Bcc => 'talexb@foobar.com', From => 'noreply@foobar.com' ], body => $output ); defined $message or die "Could not create message!"; try { sendmail( $message, { from => 'noreply@foobar.com', transport => Email::Sender::Transport::SMTP->new( { host => $EMail::Host, port => $EMail::Port, sasl_username => $EMail::User, sasl_password => $EMail::Password, ssl => 'starttls', } ) } ); } catch { warn "sending failed: $_"; };
    The complete error listing is here:
      sending failed: error at during DATA: [Net::SMTP::_SSL] Connection clo +sed Trace begun at /usr/local/share/perl/5.34.0/Email/Sender/Transport/SMT +P.pm line 259 Email::Sender::Transport::SMTP::_throw('Email::Sender::Transport::SMTP +=HASH(0x5591af605fd8)', 'error at during DATA', 'Net::SMTP::_SSL=GLOB +(0x5591b02e7890)') called at /usr/local/share/perl/5.34.0/Email/Sende +r/Transport/SMTP.pm line 270 Email::Sender::Transport::SMTP::__ANON__('error at during DATA') calle +d at /usr/local/share/perl/5.34.0/Email/Sender/Transport/SMTP.pm line + 324 Email::Sender::Transport::SMTP::send_email('Email::Sender::Transport:: +SMTP=HASH(0x5591af605fd8)', 'Email::Abstract=ARRAY(0x5591afd2b280)', +'HASH(0x5591afdc3f30)') called at /usr/local/share/perl/5.34.0/Email/ +Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at /usr/local/share/per +l/5.34.0/Try/Tiny.pm line 102 eval {...} at /usr/local/share/perl/5.34.0/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x5591b02de808)', 'Try::Tiny::Catch=REF(0x5591afd +cfb90)') called at /usr/local/share/perl/5.34.0/Email/Sender/Role/Com +monSending.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Transport::SM +TP=HASH(0x5591af605fd8)', 'Email::Abstract=ARRAY(0x5591afd2b280)', 'H +ASH(0x5591b02de418)') called at /usr/local/share/perl/5.34.0/Email/Se +nder/Simple.pm line 119 Email::Sender::Simple::send_email('Email::Sender::Simple', 'Email::Abs +tract=ARRAY(0x5591afd2b280)', 'HASH(0x5591afdc3c90)') called at /usr/ +local/share/perl/5.34.0/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} at /usr/local/share/per +l/5.34.0/Try/Tiny.pm line 102 eval {...} at /usr/local/share/perl/5.34.0/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x5591afdc3fd8)', 'Try::Tiny::Catch=REF(0x5591afc +c9ea8)') called at /usr/local/share/perl/5.34.0/Email/Sender/Role/Com +monSending.pm line 58 Email::Sender::Role::CommonSending::send('Email::Sender::Simple', 'Ema +il::Simple::Markdown=HASH(0x5591afcc2fc0)', 'HASH(0x5591af605f30)') c +alled at /usr/local/share/perl/5.34.0/Sub/Exporter/Util.pm line 57 Sub::Exporter::Util::__ANON__('Email::Simple::Markdown=HASH(0x5591afcc +2fc0)', 'HASH(0x5591af605f30)') called at sage_issues.pl line 175 main::try {...} at /usr/local/share/perl/5.34.0/Try/Tiny.pm line 102 eval {...} at /usr/local/share/perl/5.34.0/Try/Tiny.pm line 93 Try::Tiny::try('CODE(0x5591afcb89c0)', 'Try::Tiny::Catch=REF(0x5591ad4 +ae5a0)') called at script.pl line 42

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      What does the SMTP server complain about that causes E'S'T'SMTP to croak? That is say log for the exchange between the client & server is missing.

          ... Net::SMTP::_SSL=GLOB(0x5606ff569450)>>> lass=3D'left'>1 </td> + <td class=3D'left'>Covermaster 8 Roll Trans Net::SMTP::_SSL: Net::Cmd::_syswrite_with_timeout(): unexpected EOF on + command channel: Connection reset by peer at /usr/local/share/perl/5 +.34.0/Email/Sender/Transport/SMTP.pm line 324. sending failed: error at during DATA: [Net::SMTP::_SSL] Connection clo +sed Trace begun at /usr/local/share/perl/5.34.0/Email/Sender/Transport/SMT +P.pm line 259 ...

        It looks like there's a timeout .. it took ~10 minutes to fail.

        Alex / talexb / Toronto

        Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

        Right .. the debug flag. I'll try that when I get back to my office. Thanks!

        Alex / talexb / Toronto

        Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.