Skip to content

Commit

Permalink
Really fix #10 this time
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Mar 29, 2016
1 parent a480f3f commit c1cf284
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Net/SMTP/Raw.pm6
Expand Up @@ -35,7 +35,7 @@ method starttls() {
}
method switch-to-ssl() {
$!conn = IO::Socket::SSL.new(:client-socket($.conn));
$!conn.input-line-separator = "\r\n";
$!conn.nl-in = "\r\n";
}

method mail-from($address) {
Expand Down
4 changes: 2 additions & 2 deletions t/01-raw.t
Expand Up @@ -24,7 +24,7 @@ class SMTPSocket {

has $.host;
has $.port;
has $.input-line-separator is rw = "\n";
has $.nl-in is rw = "\n";
method new(:$host, :$port) {
self.bless(:$host, :$port);
}
Expand All @@ -46,7 +46,7 @@ my $client = Net::SMTP.new(:server('foo.com'), :port(25), :raw, :socket(SMTPSock
ok $client ~~ Net::SMTP, "Created raw class";
ok $client.conn.host eq 'foo.com', "with right host";
ok $client.conn.port eq '25', 'with right port';
ok $client.conn.input-line-separator eq "\r\n", 'with right line sep';
ok $client.conn.nl-in eq "\r\n", 'with right line sep';

ok $client.get-response.substr(0,1) eq '2', 'Greeting';
ok $client.helo('clientdomain.com').substr(0,1) eq '2', 'HELO';
Expand Down
2 changes: 1 addition & 1 deletion t/02-simple.t
Expand Up @@ -32,7 +32,7 @@ class SMTPSocket {

has $.host;
has $.port;
has $.input-line-separator is rw = "\n";
has $.nl-in is rw = "\n";
method new(:$host, :$port) {
self.bless(:$host, :$port);
}
Expand Down
2 changes: 1 addition & 1 deletion t/03-auth.t
Expand Up @@ -27,7 +27,7 @@ class SMTPSocket {

has $.host;
has $.port;
has $.input-line-separator is rw = "\n";
has $.nl-in is rw = "\n";
method new(:$host, :$port) {
self.bless(:$host, :$port);
}
Expand Down

0 comments on commit c1cf284

Please sign in to comment.