diff options
Diffstat (limited to 'pullimap')
-rwxr-xr-x | pullimap | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -158,7 +158,7 @@ sub sendmail($$) { if ($$rfc822 eq '') { # RFC 5321 section 4.1.1.4: if there was no mail data, the first # "\r\n" ends the DATA command itself - $SMTP->printflush("\r\n.\r\n"); + $SMTP->printflush("\r\n.\r\n") or die; } else { my $offset = 0; my $length = length($$rfc822); @@ -166,7 +166,7 @@ sub sendmail($$) { my $line = substr($$rfc822, $offset, $end-$offset); # RFC 5321 section 4.5.2: the character sequence "\r\n.\r\n" # ends the mail text and cannot be sent by the user - $SMTP->print($line eq ".\r\n" ? "..\r\n" : $line); + $SMTP->print($line eq ".\r\n" ? "..\r\n" : $line) or die; $offset = $end; } if ($offset < $length) { @@ -174,9 +174,9 @@ sub sendmail($$) { # have the receiving SMTP server recognize the "end of data" # condition. See RFC 5321 section 4.1.1.4 my $line = substr($$rfc822, $offset); - $SMTP->print(($line eq "." ? ".." : $line), "\r\n"); + $SMTP->print(($line eq "." ? ".." : $line), "\r\n") or die; } - $SMTP->printflush(".\r\n"); + $SMTP->printflush(".\r\n") or die; } smtp_resp('250'); } @@ -199,14 +199,14 @@ sub smtp_send(@) { push @code, shift // die; } if ($SMTP_PIPELINING) { # SMTP pipelining (RFC 2920) - print STDERR join('', map {"C: $_\n"} @cmd) if $CONFIG{debug}; - $SMTP->printflush(join('', map {"$_\r\n"} @cmd)); + print STDERR (map {"C: $_\n"} @cmd) if $CONFIG{debug}; + $SMTP->printflush(map {"$_\r\n"} @cmd) or die; @r = smtp_resp($_) foreach @code; } else { foreach (@cmd) { print STDERR "C: $_\n" if $CONFIG{debug}; - $SMTP->printflush("$_\r\n"); + $SMTP->printflush("$_\r\n") or die; @r = smtp_resp(shift(@code)); } } |