diff --git a/lib/node_mailer.js b/lib/node_mailer.js
index <HASH>..<HASH> 100644
--- a/lib/node_mailer.js
+++ b/lib/node_mailer.js
@@ -58,6 +58,9 @@ var email = {
       self.connection.write(email.wordwrap(options.body) + "\r\n");
       self.connection.write(".\r\n");
       self.connection.write("quit\r\n");
+    });
+
+    this.connection.addListener("end", function() {
       self.connection.end();
     });
Fixing "Stream is not writable" error when sending concurrent e-mails