Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email notifications incorrectly sending empty authentication data #312

Closed
SlothstronautX opened this issue Dec 15, 2020 · 4 comments
Closed

Comments

@SlothstronautX
Copy link

Describe the bug
When sending email notifications, if the "Auth User" and "Auth Password" fields are left blank, Overseerr still tries to authenticate against the SMTP server with empty fields, causing it to fail.

What version of Overseerr are you running?
1.5.0

You can find it under: Settings -> About -> Version

To Reproduce
Steps to reproduce the behavior:

  1. Configure SMTP Notifications and do NOT set user/password for auth
  2. Generate a notification event (make request, approve request etc)
  3. An error will be thrown that credentials are missing and the SMTP session fails

Expected behavior
SMTP Relays that do not require auth (e.g. internal notification email servers) should be able to accept SMTP sessions without any authentication, leaving the fields blank in Overseerr should indicate that authentication is not required, instead it tries to anyway with empty fields.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 2009
  • Browser Firefox
  • Version 83

Additional context
Log snippet of failure:
2020-12-15T15:40:51.388Z [info][Notifications]: Sending notification for MEDIA_PENDING
(node:28) UnhandledPromiseRejectionWarning: Error: Missing credentials for "PLAIN"
at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)
at SMTPConnection.login (/app/node_modules/nodemailer/lib/smtp-connection/index.js:438:38)
at /app/node_modules/nodemailer/lib/smtp-transport/index.js:271:32
at SMTPConnection. (/app/node_modules/nodemailer/lib/smtp-connection/index.js:209:17)
at Object.onceWrapper (events.js:421:28)
at SMTPConnection.emit (events.js:315:20)
at SMTPConnection._actionEHLO (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1303:14)
at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:932:20)
at SMTPConnection._onData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:739:14)
at TLSSocket.SMTPConnection._onSocketData (/app/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
(node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
(node:28) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@sct
Copy link
Owner

sct commented Dec 15, 2020

Thanks for the report. Will get this fixed.

@sct sct added this to Planned in Beta Release Roadmap Dec 17, 2020
@sct sct moved this from Planned to In progress in Beta Release Roadmap Dec 17, 2020
@sct
Copy link
Owner

sct commented Dec 17, 2020

Can you try the latest develop tag and let me know if this is fixed for you?

@SlothstronautX
Copy link
Author

Confirmed fixed on 1.7.0, thank you!

@sct
Copy link
Owner

sct commented Dec 17, 2020

Happy to hear it!

@sct sct moved this from In progress to Done in Beta Release Roadmap Dec 17, 2020
@sct sct closed this as completed Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants