[nodebb-plugin-emailer-local] Local email plugin
-
It might be a cache issue. I'd suggest running in dev mode to disable that if you're trying things out.
./nodebb dev
-
The admin panel is horrible about refreshing to show new plugins.
-
I fixed several problems with this plugin and made a pull request:
https://github.com/NodeBB/nodebb-plugin-emailer-local/pull/18Until someone has time to merge this I published a fork of this plugin with those changes merged in:
https://www.npmjs.com/package/nodebb-plugin-emailer-cppnet -
@dravere You should be able to use the built-in SMTP emailer in NodeBB ACP, and this plugin is no longer required AFAIK.
-
@PitaJ That is sadly not possible. The built-in SMTP emailer lacks several feature this plugin has. I need to send e-mails unencrypted without user authentication to another service running in the DMZ. This is not supported. Sendmail also is not an option thus I can't use services like ssmtp or msmtp.
With the changes I made to this plugin it not only works with the current NodeBB, but also provides unencrypted and unauthenticated e-mail transport. Quite important if you have a centralized service in your DMZ for relaying e-mails.
-
@dravere in that case, the feature you want could probably be fairly easily implemented in core. I'll look into it.
One question though: For SMTP, if no auth is required, does providing auth break it, or is it just ignored?
-
As far as I'm aware it breaks it. Because if you provide authentication options nodemailer will try to authenticate and if there is simply no available authentication the server will reject that and it will result in an error.
The plugin checks if username or password is empty. If either one is empty no authentication option is passed to the nodemailer and thus no authentication takes place.
Since I need this, I would be happy to provide a pull-request for this in the main code. I think what the plugin is doing could be very easily ported to the fallbackTransport in the core.
-
@PitaJ I probably won't bring the pull-request today as it is too late in my timezone already. But while looking at the code I found two strange things about the fallback transport:
- It seems it is only configured when NodeBB is startup? But when you change it in the e-mail settings nothing is mentioned that you need to restart the forum for the changed custom e-mail settings to take effect. Am I too tired and looking at this wrong? The fallbackTransport is only configured in
Emailer.registerApp
and that is only called on startup? - Is there a spelling error on line 66 in emailer.js?
serice
instead ofservice
? Thus the custom smtp never could actually take effect?
- It seems it is only configured when NodeBB is startup? But when you change it in the e-mail settings nothing is mentioned that you need to restart the forum for the changed custom e-mail settings to take effect. Am I too tired and looking at this wrong? The fallbackTransport is only configured in
-
It seems it is only configured when NodeBB is startup? ...nothing is mentioned that you need to restart the forum for the changed custom e-mail settings to take effect
Yeah, there's always room for improvement in our explanations on the ACP. I believe it would require a restart to take effect.
Is there a spelling error on line 66 in emailer.js?
Yep. That's a typo. Makes it so the custom service wouldn't work. Thanks.
Edit: I created an Github issue to track these problems: NodeBB/NodeBB#5951