Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 24 09:46
    andris9 commented #1140
  • Jun 24 09:36
    eichlerz commented #1140
  • Jun 24 08:44
    AntonEvdochenko commented #1410
  • Jun 23 09:51
    iftikharkhan90 commented #1415
  • Jun 23 09:49
    abias1122 closed #1429
  • Jun 23 09:49
    abias1122 commented #1429
  • Jun 22 13:55
    abias1122 opened #1429
  • Jun 22 12:56
    abias1122 commented #1424
  • Jun 20 08:48
    djordjepetrovicdjordje commented #1403
  • Jun 20 06:17
    Elendiar commented #1410
  • Jun 20 06:14
    Elendiar commented #1410
  • Jun 20 06:13
    Elendiar commented #1410
  • Jun 19 20:03
    julientype commented #1418
  • Jun 19 19:52
    julientype commented #1418
  • Jun 19 12:11

    andris9 on andris9-patch-1


  • Jun 19 12:11

    andris9 on master

    Update test.yml (#1428) Only r… (compare)

  • Jun 19 12:11
    andris9 closed #1428
  • Jun 19 12:11
    andris9 opened #1428
  • Jun 19 12:11

    andris9 on andris9-patch-1

    Update test.yml Only run tests… (compare)

  • Jun 19 11:57

    andris9 on master

    Add Bluewin config to well know… (compare)

Evan Sendra
Ah, I got it all working. My problem actually was that I was using node 4.4.3. After using Chocolatey to upgrade to some 7+, it's all working.
hi, i am looking for an example how to use DSN with nodemailer version 0.7.1
Andris Reinman
Nodemailer 0.7.1 is 3 years old by now, I'm amazed that it still works even though it supports Node.js v0.5 and probably even older versions of Node. Anyway, there's an undocumented option dsn, I'm not sure how it worked, you probably should look into the SMTP client code in simplesmtp module to check it out.
Willymar Juniarta
Suresh Kumar Sivasankaran
Hi everyone
I wanted to build a listener service for multiple email accounts by which I need to trigger event on receiving new email.
Can anyone help me how can I implement this?
https://github.com/chirag04/mail-listener2 can be used for one email id
I need to implement multiple
Hello - I'm having an odd issue in production (but not local) when sending an attachment using a filename as a string variable does not work when a string literal does work. so filename: name' wherevar name = 'test.xml'does not work butfilename:'test.xml'` sends fine... any thoughts?
Erik Demaine
@cookkb Sounds like a Javascript bug, not related to Nodemailer.
@AdamInTheOculus @edemaine Thanks for the input, after looking at my question and tweaking my code... my example wasn't written as clearly as it should be... My resolution was similar to that of @AdamInTheOculus on April 5... removing the contentType resolved the issue when using a variable for filename
Hassan Talat
hello, i am using nodemailer with smtp transport. i get successful response from nodemailer but the email does not end up in the inbox. any ideas what to do / check?
heres the transport object im using
          let transporter = nodemailer.createTransport({
            host: process.env.MAIL_DOMAIN,
            port: 465,
                rejectUnauthorized: false
            auth: {
                user: process.env.MAIL_USERNAME,
                pass: process.env.MAIL_PASSWORD
Andris Reinman
Nodemailer returns you whatever the MTA server (in your case process.env.MAIL_DOMAIN) returns to it, so you should check what happens with this message in that MTA server. If it's your own server (eg. a Postfix or Exim instance), check the mail log of that server. if you use a service (eg. SendGrid, Mailgun etc.) then these services usually provide an overview of delivered messages in their web interface.
Hello, Is there a way to send a mail directly to a SMTP server using nodemailer which is running behind a proxy. i.e. useProxy is true.
Basically, SMTP server expects PROXY header before handshake.
Could you please help in this ? cc @andris9
Hassan Talat
@andris9 yeah will have to check the mail server, debugger shows message being sent successfully but just does not ends up in the inbox.
Seán Hayes
I'm using the direct transport of nodemailer 2.6.4. I've just discovered that it stopped working. Earlier I was getting a very generic message that there was a failure, now transporter.sendMail() is just hanging forever
it just failed with "ServiceUnavailableError: Response timeout"

Hello, Is there a way to send a mail directly to a SMTP server using nodemailer which is running behind a proxy. i.e. useProxy is true.
Basically, SMTP server expects PROXY header before handshake.

Resolved !

i am getting error { Error: connect ECONNREFUSED at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) code: 'ECONNECTION', errno: 'ECONNREFUSED',
@akileshv Try connecting to your SMTP server using telnet command.
Ex: telnet 587, send us output
@pranshu792 Unable to connect to remote host: Connection refused
SMTP is not listening on your local and 587 port, make sure it is running and have proper rights to connect to it.
Peter Reid
errrm...anyone got any idea what's going on with the repo?
commits to master have re-initialised the repository.. @andris9
Hey guys, I've got windows 10 with windows defender. I configured my smtp server with smtp-server but I get a "self signed certificate error" when I try to send an email. I disabled my antivirus and I still have this issue. Any ideas how to fix this or does anyone have a snippet that can get me started??
Hi guys, I am on node version 4.3.1, when I add "nodemail":"*" in my package.json and run "npm i" I get this error: npm ERR! notarget No compatible version found: mongoose@~3.1.2
I dont have any other dependency in my package.json
oops, ignore, it should be nodemailer not nodemail
AbdulSamii Ajala
HI everyone!
I have built a WebRTC app for video, audio and file transfer. But the last requirement is that users invite their friends on to the platform to chat with them. So my question is how do I achieve that with nodemailer without using my email as the sender but rather the users' email.
Hi everyone, I'm trying to attach files to my emails being sent with Nodemailer. Emails are going through, but the issue is that I don't receive the attachments, I need to attach a jpg image, tried with that and text too but no success. I'm using Gmail for both sender and receiver. Anyone any clue? It would be much appreciated.

Hi Guys,
i want to use nodemailer with sendmail but got:

{ Error: connect ECONNREFUSED
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
syscall: 'connect',
address: '',
port: 25,
command: 'CONN' }

telnet works

$ telnet 25
Connected to
Escape character is '^]'.
220 bla@blub.tld ESMTP Postfix (Ubuntu)

iptables is configured to accept allr outgoing

Do you have any advice why i got this connection refused?
Ah okay i think i found my error. It was caused by configuration problems because i used nodemailer inside a docker container.
but thanks anyway

Okay my error still exists but i am able to send a mail from the guest os (docker container) through the host os postfix (MTA).
It seem to my that nodemailer tries to open a connection to the MTA of the guest os (docker container) which has no MTA installed.
My first assumption was that the nodemailer-sendmail-transport is not spawning the proper command and put a log out before to inspect the spawned command and args but this section is never reached.

So, is nodemailer open a connection to during transport creation?
Can i configure this behavior?
Because i only need to spawn the sendmail command to get my sending a email issue working ... ?

Ah i forgot I am using the nodemailer version 2.7.0 and sendmail-transport 1.0.2

Can you guys please help me and provide an advice how to solve the last remaining config issue for my problem?


Okay now i upgraded to version 4.0.1 and use the internal sendmail feature.
This gives me the success callback but the mail is not send.

sendmail command spawned: /usr/sbin/sendmail [ '-i', '-f', 'blah@blub.de', 'test@gmail.com' ]

Result is:
Mail send { envelope:
{ from: 'blah@blub.de',
to: [ 'test@gmail.com' ] },
messageId: '18db223c-6e90-a629-4c2e-e6647a939bc6@blub.de',
response: 'Messages queued for delivery' }

i logged the spawned command then and use it manualy in the terminal and my mail was send.
This is a curious behaviour. (@.@)

Anyone have an idea about this?

AbdulSamii Ajala

I am developing a pure node App (without express or any other framework)
I stored some values in the req (request) object like this

req.token = uuid();

in another route, when I did this


I get undefined. Please is there a sure way of saving value into the http request object for later use?

Hi guys, have you guys is the templateSender function for built in templating gone in nodemailer 4.1.0? Looking in tutorials this was the function needed to do builtin templating
I've set X-Mailer header but it always return "X-Mailer: nodemailer (2.7.2; +https://nodemailer.com/; SMTP/2.7.4[client:2.12.0])"
Can I override X-Mailer header? thanks
Joe Early

Hi all, I am wondering why the following:

from: req.params.name + ' <' + req.params.email + '>',

keeps returning the error: Domain of sender address XXXXXX@gmail.com&#62 does not exist

It does not seem to like the "right-tag" on at the end.
Joe Early
from: req.params.name + ' ' + req.params.email,
This worked fine :shipit: