Danor / nodebb-plugin-emailer-smtp

Plugin for NodeBB allowing you to send e-mail via SMTP.
MIT License
2 stars 12 forks source link

Office 365 SSL error #1

Open sbaitz opened 8 years ago

sbaitz commented 8 years ago

Hi,

Was hoping to use this emailer plugin for our site to have emails pipe through Office 365. Once setting it up and testing sending an email (sending a user validation email in NodeBB), we see the error in the attached screenshot smtp-o365-error

Doing a quick search on this error resulted in this article (hopefully it helps): http://stackoverflow.com/questions/29812132/error-sending-email-using-nodemailer-via-office365-smtp-meanjs-scaffold

Thanks,

Scott

jiangcaiyang commented 7 years ago

I 've met the same problem, because of errors, I have to close the email confirmation.

Mine uses aliyun ISP.

Log says

/11 10:42 [8763] - info: NodeBB is now listening on: 0.0.0.0:80
7/11 10:45 [8763] - warn: [emailer.smtp] Unable to send `digest` email to uid 21!
7/11 10:45 [8763] - error: [plugins] filter:email.send,  139913047955328:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

7/11 10:45 [8763] - warn: [emailer.smtp] Unable to send `digest` email to uid 21!
7/11 10:45 [8763] - error: [plugins] filter:email.send,  139913047955328:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:
jiangcaiyang commented 7 years ago

It is the problem of underlying dependencies, so you'd better not use this plugin, and use nodebb-plugin-emailer-local instead.

DVR-Ltd commented 7 years ago

Hi,

I encountered the same problem this morning and was able to solve it. In my case I was trying to use a non-secured SMTP server but was getting error messages mentioning SSL.

I haven't tested this properly (and can't easily) so I'm not submitting an update myself but it worked in my case.

On line 34 of index.js, I changed secure: settings['emailer:local:secure'], to secure: (settings['emailer:local:secure'] !== "off"),

I hope this helps others.

Regards,

Gary Ott

elelel commented 7 years ago

I can confirm @DVR-Ltd 's fix works (tested on a self-hosted Postfix SMTP SSL server)