Hey, it's me again.
I switched back to node-mailer for a while and here is the feedback:
1. Installing iconv() is a pain - can you do without it - as a result,
I landed up installing 0.4.52 at many places
2. I get such random crashes when the timout between sending many
messages is 1s - 3s (didn't try for higher values). My guess is that
the socket close event isn't being fired and because of this the write
fails (on a closed socket). I've faced such a situation in one of my
projects and I have landed up wrapping every write() in a try/catch
block and re-trying the connection when it throws an exception.
/opt/node-v0.4.7/lib/node_modules/mailer/lib/node_mailer.js:123
self._stream.write([
^
TypeError: Cannot call method 'write' of null
at writeData (/opt/node-v0.4.7/lib/node_modules/mailer/lib/
node_mailer.js:123:26)
at /opt/node-v0.4.7/lib/node_modules/mailer/lib/node_mailer.js:
97:15
at EventEmitter.onEvent (/opt/node-v0.4.7/lib/node_modules/mailer/
lib/node_mailer.js:185:11)
at EventEmitter.emit (events.js:61:17)
at Carrier.<anonymous> (/opt/node-v0.4.7/lib/node_modules/mailer/
lib/node_mailer.js:174:26)
at Carrier.emit (events.js:64:17)
at /opt/node-v0.4.7/lib/node_modules/mailer/node_modules/carrier/
lib/carrier.js:40:16
at Array.forEach (native)
at Socket.<anonymous> (/opt/node-v0.4.7/lib/node_modules/mailer/
node_modules/carrier/lib/carrier.js:26:13)
at Socket.emit (events.js:64:17)
3. If the timeout is 300ms (I think you hold the connection for 1
sec), then the server seems to disconnect after a certain number of
messages.
I don't know how to fix this!! Too fast and the server screws me, too
low and the lib. takes revenge... :-(
> I don't think so, there is an outstanding issue with this. We are actually
> in the process of refactoring node_mailer this weekend, there will be a new
> version coming out shortly. In the mean-time I would recommend trying out
> some of the other mailer libraries.
>
> node_mailer started as a very short gist before there were any other email
> sending solutions. Since then, there have been several improvements to node,
> and a lot of work done for properly implementing the SMTP protocol in node.
>
> I'm sorry I couldn't be more helpful to immediately solve your issue. I hope
> to be pushing for a stable release candidate (v1.0.0 )for node_mailer
> sometime in the next 2-3 months.
>
> - Marak
>