Email notification is not working

Hello,

I just upgrade our KNIME Server to 4.12.0. I would like to schedule a job to run and email the result pdf to the stake holder. The workflow runs at the schedule time but email is not been sent out.

I tried to mess with knime.xml file but with no luck. I tried to using send email node in one of my workflow to test if the credential and my smtp.gmail works and to my surprise it does work.

In the log file it does say it is attempting but it does not say that it was successful was able to send out the email with attachment.

18-Jan-2021 14:55:26.502 INFO [KNIME-JobNotification-1] com.knime.enterprise.server.jobs.NotificationSenderImpl.sendMails Sending notification mail for

Thanks,

KP

Hello @kamleshp,

please have a look at the Upgrade Guide for 4.12.0 here

The configuration option was moved from the knime.xml file to the knime-server.config. In addition it is now possible to configure this via UI on the new webportal → Administration → Configuration → General.

Cheers,
Michael

3 Likes

Hi @MichaelRespondek

In KNIME webportal - under General setting I only have the option for admin email-id. I don’t see any option for gmail SMTP settings.

Also could you please let me know under which folder I will find knime-server.config file?

Thanks,
KP

Please scroll a little bit further down or search for smtp within the page. Then you should be able to configure mail.smtp.user, mail.smtp.from, mail.smtp.host and mail.smtp.port.

The knime-server.config is located at /workflow_repository/config, on cloud (AWS, Azure) instances in /srv/knime_server/config. If you already had a working configuration you can use all the options, just use for each option a single line.

Cheers,
Michael

Hi @MichaelRespondek

This is how it suppose to look?
com.knime.enterprise.executor.embedded-broker=true
com.knime.enterprise.executor.msgq=xxxxxxxx
com.knime.server.admin_email=emai-id
com.knime.server.authentication.preferredType=Credentials
com.knime.server.authentication.types=Credentials
com.knime.server.config.watch=true
com.knime.server.default_mount_id=knimeserver
com.knime.server.executor.knime_exe=/opt/knime_server/executor_latest/knime
com.knime.server.executor.max_lifetime=1d
com.knime.server.executor.update_metanodelinks_on_load=true
com.knime.server.job.discard_after_timeout=false
com.knime.server.repository.update_recommendations_at=01:00
com.knime.server.server_admin_groups=admin
com.knime.server.server_admin_users=xxxxxxx
com.knime.server.webportal.csp=default-src ‘self’ www.gstatic.com; script-src ‘unsafe-inline’ ‘unsafe-eval’ ‘self’ www.gstatic.com maps.googleapis.com; style-src ‘unsafe-inline’ ‘self’ www.gstatic.com fonts.googleapis.com; img-src ‘self’ www.gstatic.com maps.google.com maps.googleapis.com maps.gstatic.com data:; font-src ‘self’ fonts.gstatic.com www.gstatic.com;
com.knime.server.webportal.disable_warning_messages=true
mail.from=gmail-email-id
mail.smtp.host=smtp.gmail.com
mail.smtp.port=587
mail.smtp.auth=true
mail.smtp.user=gmail-email-id
mail.password=gmail-email-id-password
mail.smtp.starttls.enable=false
mail.smtp.ssl.enable=true

If yes, then it is not working.

It would be helpful if you can give an example file.

Thanks,

Could you please try to set
mail.smtp.starttls.enable=true
mail.smtp.ssl.enable=false
as port 587 is used for StartTLS.

Regarding this Google smtp guide your mentioned configuration should be valid also if you change the mail.smtp.port to 465.

There is also a limit of 2000 mails per day mentioned as well as an alternative way. If you are using gmail with two factor authentification for the used account you have to create an app specific password for the KNIME Server first, this is also linked in the article above.

Cheers,
Michael

1 Like

@MichaelRespondek

Do I have to restart the server and executor?

Thanks,
Kamlesh

@MichaelRespondek

It work’s.

Thank you so much for your help!

KP

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.