Email Configuration Error

Hi,
is there any idea , how i can fixed it

Thanks

1 Like

Hi apurba
Did you configure the SMTP in Ģ¶mĢ¶aĢ¶nĢ¶aĢ¶gĢ¶eĢ¶rĢ¶_Ģ¶cĢ¶oĢ¶nĢ¶fĢ¶iĢ¶gĢ¶.Ģ¶jĢ¶sĢ¶oĢ¶nĢ¶ docker-compose.yml?
Please show the configuration (without sensitive data ofc)

p.s. I noticed you use Google Workspace, i think you need to use an app-specific password if you havenā€™t already

Hi pcr,
i am using google app password .

what to do in manager.config


Sorry in yml not manager_config.json

This is my configuration, you are missing some ports/protocols

    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST: ${OR_EMAIL_HOST:-my.smtp.com}
      OR_EMAIL_USER: ${OR_EMAIL_USER:-my@username.com}
      OR_EMAIL_PASSWORD: ${OR_EMAIL_PASSWORD:-mypassword}
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: ${OR_EMAIL_FROM:-my@username.com}
      OR_EMAIL_ADMIN: ${OR_EMAIL_ADMIN:-my@username.com}

Hi,
now getting this issue

Did you just change mail configuration or did anything else in the meantime? If you revert the changes it gives the same error?

Hi pcr ,
i am getting error like below

any idea @Don @martin.peeters

Did you put both of this?

      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}

yes

Screenshot_20230327_210348

Hi PCR,
any solution regarding this ,

without port no and Tls , i configured it before and also get email notification .but after changes in yml regarding storage issue ,its not working

I didnā€™t actually update to the latest version, so itā€™s better if we wait for a comment by someone from the team

Hi,
Thanks for your support , i tried many options and deploy in new machine also (old yml file)
, Getting same error .

Actually need to show in presentation this feature.

If you guess anything pls share

Thanks

Tried few more things:
-apparently iā€™m able to make it work only with another smtp, with Google itā€™s not working. Tried a few combinations with/without STARTTLS or SSL but nothing happens. Other SMTP with exact same configuration works

Hi @pcr,
unfortunately I do not get it to work either. Which SMTP did you use? Can you maybe give me some example values to fill in my docker-compose.yml, which you see in the following?

  manager:
#    privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST:
      OR_EMAIL_USER:
      OR_EMAIL_PASSWORD:
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM:
      OR_EMAIL_ADMIN:
      OR_HOSTNAME: ${OR_HOSTNAME:-localhost}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:-}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}
      OR_DB_HOST: ${DATABASE_URL}
      OR_DB_PORT: ${DATABASE_PORT}
      OR_DB_USER: ${DATABASE_USERNAME}
      OR_DB_PASSWORD: ${DATABASE_PASSWORD}

I made it work with this
The smtp is provided by a local national hosting site
If I try with my Google Workspace account, same configuration, it doesnā€™t work

One thing I noticed, but not sure if itā€™s useful, is that I get the ā€œmust issue STARTTLS commandā€ if I write the variables like this
OR_EMAIL_USER: my@email.com
Instead if I write it as
OR_EMAIL_USER: ${OR_EMAIL_USER:-my@email.com}
I get the error
Error processing from REALM_RULESET - NOTIFICATION_HANDLER_CONFIG_ERROR (Handler is not valid: email): Notification{name=ā€˜nullā€™, message=org.openremote.model.notification.EmailNotificationMessage@1e26a3b7, repeatFrequency=null, repeatInterval=ā€˜nullā€™, targets=[Target{type=USER, id=xxxx}]}
Iā€™m wondering if heā€™s getting some values from somewhere else that bugs it? From what I understood the parenthesis should mean "use the variable, otherwise by default value is the one following :- "

yeah same thing is happening with me

hi @Don any missing configuration here

Thanks for your answer, but unfortunately it still does not work.

I used:

  manager:
#    privileged: true
    restart: always
    image: openremote/manager:${MANAGER_VERSION:-latest}
    depends_on:
      keycloak:
        condition: service_healthy
    environment:
      OR_SETUP_TYPE:
      OR_ADMIN_PASSWORD:
      OR_SETUP_RUN_ON_RESTART:
      OR_EMAIL_HOST: smtp.web.de
      OR_EMAIL_USER: leoxxx@web.de
      OR_EMAIL_PASSWORD: xxx
      OR_EMAIL_PORT: ${OR_EMAIL_PORT:-587}
      OR_EMAIL_TLS: ${OR_EMAIL_TLS:-STARTTLS}
      OR_EMAIL_X_HEADERS:
      OR_EMAIL_FROM: leoxxx@web.de
      OR_EMAIL_ADMIN:
      OR_HOSTNAME: ${OR_HOSTNAME:-xxx.de}
      OR_ADDITIONAL_HOSTNAMES: ${OR_ADDITIONAL_HOSTNAMES:-}
      OR_SSL_PORT: ${OR_SSL_PORT:-}
      OR_DEV_MODE: ${OR_DEV_MODE:-false}
      OR_DB_HOST: ${DATABASE_URL}
      OR_DB_PORT: ${DATABASE_PORT}
      OR_DB_USER: ${DATABASE_USERNAME}
      OR_DB_PASSWORD: ${DATABASE_PASSWORD}

and get the following error:

Error processing from REALM_RULESET - NOTIFICATION_HANDLER_CONFIG_ERROR (Handler is not valid: email): Notification{name='null', message=org.openremote.model.notification.EmailNotificationMessage@606ab39a, repeatFrequency=null, repeatInterval='null', targets=[Target{type=USER, id=91d45952-e957-44e0-89b0-d72b3ec71abb}]}

Did I do something wrong?

@Don any idea about this? Have you ever configured an SMTP on Google?

Iā€™ve done something with gmail in a different application and I needed a specific key. Something like this I guess: Sign in with App Passwords - Google Account Help

Edit: Oh, you posted that already. That didnā€™t work?

Yep, it didnā€™t work
It was the first thing I thought since Google expect those passwords for anything that doesnā€™t use OAuth2
I suspect there is something wrong with the combination of ports/protocols, but 587 STARTTLS is the standard for Gmail. Maybe someone else in the staff has an instance with gmail or can give it a try?