Looping through dataset and sending mass emails

Is there any way to find the “readiness” of your SMTP Host / Port within a KNIME workflow?

I want to accomplish the following within the loop of the workflow pictured below:
(1) Send an email
(2) Set wait = True
(3) Extract the “readiness” information for the SMTP Host / Port every second or so
(4) When the SMTP Host / Port is ready to send the next email, then set wait = False, and proceed to the next iteration of the loop.

Does anyone have any advice here? Obviously I could just choose a large waiting increment, but then on days when I send 1000s of emails, that takes a while. I would like to cut down on that time.

Best,
Richard

Hi @rrembert3,

the Send Email node automatically sends emails to a preconfigured SMTP (email) server. We can’t control what the server does with the emails or request it’s state.

However, should the node fail depending on the server response, you could surround the Send Email node in a try-catch construct and only wait (or wait longer) if the node fails.

In the case of failure, the error message may also contain information on why it failed (and that could contain rate-limiting information, how long to wait until the next mail can be sent).
This may need to be determined via trial and error though.

Kind regards
Marvin

2 Likes

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