Skip to content
Browse files

A few changes to the DATA command packet.

  • Loading branch information...
1 parent 1de711a commit dd485d7b2629ae3971b6b3211696f7376f427ce6 @miksago committed Jan 17, 2010
Showing with 3 additions and 4 deletions.
  1. +2 −2 examples/example-client.js
  2. +1 −2 lib/smtp/client.js
View
4 examples/example-client.js
@@ -13,8 +13,8 @@ var client = new smtp.Client();
var message = "Date: "+(new Date()).toString()+" \
From: Node-SMTP <"+config.from+">\
-Subject: Node SMTP Works!\
-To: micheil@brandedcode.com\
+Subject:\tNode SMTP Works!\
+To: <"+config.to+"\
So, It looks like node-smtp all works, which is great news! Time for some sleep I think though.\
\
G'night Micheil.";
View
3 lib/smtp/client.js
@@ -240,8 +240,7 @@ Client.prototype.data = function(data){
this.send("DATA").addCallback(function(packet){
if(packet.status == "354"){
- client.writeline(data);
- client.send(".").addCallback(function(packet){
+ client.send(data+"\r\n.").addCallback(function(packet){
if(packet.status == "250"){
promise.emitSuccess();
} else {

0 comments on commit dd485d7

Please sign in to comment.
Something went wrong with that request. Please try again.