Missing newlines #4

Closed
deitch opened this Issue Jun 21, 2011 · 6 comments

Projects

None yet

3 participants

@deitch
deitch commented Jun 21, 2011

I found another issue.

Because you use socket.on('line') instead of socket.on('data'), you are stripping out newlines.

For the headers, this makes a lot of sense. But for the data portion, i.e. the body of the message, you lose the lines which may be crucial to encoding.

The issue is on line 138 of smtp.js. You need to either always send the newline, or understand when you are in headers and when in message body. The message body should never strip out newlines, or it screws up encodings.

@aredridel
Owner

Oh. You are SO RIGHT. My bad!

@deitch
deitch commented Jun 21, 2011

:-)

On Tue, Jun 21, 2011 at 9:37 PM, aredridel <
reply@reply.github.com>wrote:

Oh. You are SO RIGHT. My bad!

Reply to this email directly or view it on GitHub:
#4 (comment)

Avi Deitcher
avi@deitcher.net

@aredridel aredridel added a commit that closed this issue Jun 21, 2011
@aredridel Don't strip newlines from messages
- won't affect headers since it already `trimRight()`s them.
- should fix #4
3533e47
@aredridel aredridel closed this in 3533e47 Jun 21, 2011
@deitch
deitch commented Jun 21, 2011

Did you update npm?

@hamin
hamin commented Jun 21, 2011

Aw man i really needed this for kyatchi http://hamin.github.com/kyatchi/ :) Thanks!

@aredridel
Owner

I did update npm.

@deitch
deitch commented Jun 21, 2011

Thanks

On Jun 21, 2011, at 4:12 PM, aredridel
reply@reply.github.com
wrote:

I did update npm.

Reply to this email directly or view it on GitHub:
#4 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment