I am trying to set up dataiku API to send email to custom users with custom message once endpint gets triggered. because scenarios can not run in parallel i would not be able to use the following suggestion.
If you want to send an email from an API endpoint, it's probably easiest to do this simply through a Python function in the API endpoint, and use Python to send the email. You can likely use the Python email package or any similar package.
Here is an example:
Here is the example Python function endpoint code where my SMTP server is running on 0.0.0.0:1025:
# Import the email modules we'll need
from email.message import EmailMessage
# Insert here initialization code
# This function is the entry point for your Python function API
# You can call this function with passing "param1", "param2",
# "param3" as arguments to the API call
# (see REST API documentation)
print('do some stuff')
msg = EmailMessage()
msg.set_content('Your endpoint executed with the following results...')
msg['Subject'] = 'Endpoint email'
msg['From'] = 'firstname.lastname@example.org'
msg['To'] = 'email@example.com'
# Send the message via our own SMTP server.
s = smtplib.SMTP('0.0.0.0:1025')