Changedetection.io and problem setting up SMTP mail notification

Tryingto set up changedetection.io on my Proxmox.

The software is up and running, but have a PITA trying to get the mail notification up and running with SMTP.

It seems I have connection with the mailserver, but right now I’m going in circles. Trying with AI to help solve my issue, but for every solution I try, it gives me a new error. Just to be clear I have 2FA set up on the smtp gmail, and a seperate app password that I use.

So here is what I have so far:

mailto://user_name_for_SMTP:[email protected]:[email protected]

Gives me this error:

  • 2024-10-04 08:45:42,692 - WARNING - Connection error while submitting email to smtp.gmail.com. Reason: Connection unexpectedly closed
  • 2024-10-04 08:45:32,628 - DEBUG - Connecting to remote SMTP server…
  • 2024-10-04 08:45:32,627 - DEBUG - Delivery: smtp.gmail.com:465

Checking with AI, reason could be:

Port 465 – Error: “Connection unexpectedly closed”

  • Explanation: Port 465 is for SSL, but the error indicates that the connection is being closed, likely because the configuration isn’t enforcing SSL properly or the server is failing to negotiate a secure connection.
  • Solution: For port 465, you need to use smtps:// (not smtp://) to enforce SSL from the start of the connection.

So I change my setting to:

mailto://user_name_for_SMTP:[email protected]:[email protected]

Now it gives me this error:

  • 2024-10-04 08:44:15,615 - WARNING - Connection error while submitting email to smtps.gmail.com. Reason: [Errno -2] Name or service not known
  • 2024-10-04 08:44:15,572 - DEBUG - Connecting to remote SMTP server…
  • 2024-10-04 08:44:15,572 - DEBUG - Delivery: smtps.gmail.com:465

If I try to run with port 587, as this:

mailto://user_name_for_SMTP:[email protected]:[email protected]

I get this error:

  • 2024-10-04 08:52:34,886 - WARNING - Connection error while submitting email to smtp.gmail.com. Reason: SMTP AUTH extension not supported by server.
  • 2024-10-04 08:52:34,856 - DEBUG - Applying user credentials…
  • 2024-10-04 08:52:34,755 - DEBUG - Connecting to remote SMTP server…
  • 2024-10-04 08:52:34,755 - DEBUG - Delivery: smtp.gmail.com:587

If I take away the smtp in the mail like this:

mailto://user_name_for_SMTP:[email protected]:[email protected]

I suddenly get this error:

  • 2024-10-04 09:09:12,628 - WARNING - Connection error while submitting email to smtp.gmail.com. Reason: (535, b’5.7.8 Username and Password not accepted. For more information, go to\n5.7.8 Can't sign in to your Google Account - Gmail Help 2adb3069b0e04-539a825127fsm352318e87.51 - gsmtp’)
  • 2024-10-04 09:09:11,719 - DEBUG - Applying user credentials…
  • 2024-10-04 09:09:11,636 - DEBUG - Securing connection with STARTTLS…
  • 2024-10-04 09:09:11,571 - DEBUG - Connecting to remote SMTP server…
  • 2024-10-04 09:09:11,571 - DEBUG - Delivery: smtp.gmail.com:587

Since the app password from google comes with 16 letters, with a space between every 4th one, I have tried with and without spacing, like this:

xxxx xxxx xxxx xxxx and xxxxxxxxxxxxxxxx, but no difference.

Appreciate if anyone is able to point me in the right direction :slight_smile:

Thanks

It works!!

Here is the itty bitty detail that stopped the whole thing.

Password that google gives you is given like this:

1234 1234 1234 1234

Total of 16 characters with 3 spaces.

If you mark it to copy/paste, it only marks the letters.

BUT, when you paste it in, and marked EVERYTHING it’s actually a 4th space at the end of the passwordstring.

All those spaces had to be present inside the argument for the smtp setup, like this:

mailto://user_name_for_SMTP:1234 1234 1234 1234 @gmail.com:[email protected]

I missed the last one…

I struggled with this for 2 hours last night :joy: :joy:

1 Like

Sure would be neat if a little character count were a standard feature of text input area elements. Just as a standard feature of HTML.