summary refs log tree commit diff stats
path: root/lib/pure/smtp.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/smtp.nim')
-rw-r--r--lib/pure/smtp.nim18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/pure/smtp.nim b/lib/pure/smtp.nim
index abf268942..6a3f65279 100644
--- a/lib/pure/smtp.nim
+++ b/lib/pure/smtp.nim
@@ -28,9 +28,6 @@
 ## For SSL support this module relies on OpenSSL. If you want to 
 ## enable SSL, compile with ``-d:ssl``.
 
-when not defined(ssl):
-  {.error: "The SMTP module should be compiled with SSL support. Compile with -d:ssl."}
-
 import sockets, strutils, strtabs, base64, os
 
 type
@@ -54,16 +51,11 @@ proc debugSend(smtp: TSMTP, cmd: string) =
 
 proc debugRecv(smtp: var TSMTP): TaintedString =
   var line = TaintedString""
-  var ret = False
-  ret = smtp.sock.recvLine(line)
-
-  if ret:
-    if smtp.debug:
-      echo("S:" & line.string)
-    return line
-  else:
-    OSError()
-    return TaintedString""
+  smtp.sock.readLine(line)
+
+  if smtp.debug:
+    echo("S:" & line.string)
+  return line
 
 proc quitExcpt(smtp: TSMTP, msg: string) =
   smtp.debugSend("QUIT")