I am new to Ignition, Can anyone help me out.
I am trying to bring email id from database and sending email with Script block in pipeline.I am getting error massage as Error executing scripting block in logs. I am triggering script block with Switch block then Script block will start executive and have to send email to the user.Can u please tell me can i send email with Script block without notification block for dynamic users.
The following is Script which is written in Script block.
query = system.db.runScalarQuery(" SELECT email_id FROM database.userlist where user_id = 2")
recipients = [query]
body = “Hello, this is an email”
smpt = “smpt.gmail.com:465:tls”
system.net.sendEmail(“mail.gmail.com”,"email@example.com", “Here is the email!”, body, 0, recipients)