Trouble sending email in KNIME – "UnknownHostException: smtp.gmail.com" on ports 587 and 465

Hi everyone,

I’m trying to send emails from KNIME using Gmail’s SMTP, but I’m consistently encountering errors and can’t figure out what’s going wrong. Here’s what I’ve tried so far:

I’ve verified that “Less secure apps” access is off(Gmail has deprecated this anyway).
I created an App Password** and used it in the credentials.
I’ve also disabled 2-step verification** to test with my regular password (still fails).
I’ve tried both ports:
587 with STARTTLS enabled
465 with SSL/TLS enabled

And yet, I keep getting the following error messages:

Execute failed: This error occurred while communicating with the SMTP server:
"com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com , 587; timeout 3000;
nested exception is: java.net.UnknownHostException: smtp.gmail.com"

and

Execute failed: This error occurred while communicating with the SMTP server:
"com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com , 465; timeout 3000;
nested exception is: java.net.UnknownHostException: smtp.gmail.com"

It looks like a DNS resolution issue (UnknownHostException). I’m running KNIME in a corporate network, but I also tried it on another internet connection (mobile hotspot) and still get the same error.

Any ideas on how to resolve this or confirm where the problem lies (KNIME vs. network vs. system config)? Any help would be greatly appreciated.

Thanks in advance!

William

I think you are using the base node right and not any of these:

I’m walking through how to use the above extension in my article:

It’s in section 5…