foreach ($rd, $wd) {
close $_ or $self->panic("Can't close: $!");
}
+ foreach (qw/STDIN STDOUT/) {
+ binmode($self->{$_}) // $self->panic("binmode: $!")
+ }
}
else {
foreach (qw/host port/) {
setsockopt($socket, Socket::IPPROTO_TCP, 18, 1000 * $cnt * $intvl)
or $self->fail("Can't setsockopt TCP_USER_TIMEOUT: $!");
+ binmode($socket) // $self->panic("binmode: $!");
$self->_start_ssl($socket) if $self->{type} eq 'imaps';
$self->{$_} = $socket for qw/STDOUT STDIN/;
}
- binmode $self->{$_} foreach qw/STDIN STDOUT/;
# command counter
$self->{_TAG} = 0;
next if $! == EINTR; # try again if connect(2) was interrupted by a signal
die "connect: $!";
}
+ binmode($SMTP) // die "binmode: $!";
smtp_resp('220');
my @r = smtp_send($ehlo => '250');