I have successfully configured the SMTP Gmail server in ignition. I have tested it too, able to send email from the ignition test option. When I try to use system.net.sendEmail in my script, not able to send email. Here is my code,
smtp = "smtp.gmail.com:587"
myFrom = "srinisekar9899@gmail.com"
subject = "Here is the email!"
body = "New Ticket has been created"
html = 0
recipients = ["seenudhanum283@gmail.com"]
system.net.sendEmail(smtp,myFrom, subject, body, html, recipients)
Attached the image of SMTP server setting.
Kindly help me out. I am using ignition in AWS server .
Adding the error message!
" Error running action 'dom.onClick' on Templates/Ticketing/createTicketPopUp@PaddNewTicket/root/DownloadFlex/Button: Traceback (most recent call last): File "function:runAction", line 23, in runAction 530-5.7.0 About SMTP error messages - Google Workspace Admin Help and review RFC 3207 530 5.7.0 specifications. d2e1a72fcca58-7042eba77e2sm6137676b3a.104 - gsmtp at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2358) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1823) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1300) at javax.mail.Transport.send0(Transport.java:255) at javax.mail.Transport.send(Transport.java:124) at com.inductiveautomation.ignition.gateway.script.GatewayNetUtilities.sendEmail(GatewayNetUtilities.java:262) at com.inductiveautomation.ignition.gateway.script.GatewayNetUtilities.sendEmail(GatewayNetUtilities.java:133) at com.inductiveautomation.ignition.gateway.script.GatewayNetUtilities._sendEmail(GatewayNetUtilities.java:59) at com.inductiveautomation.ignition.common.script.builtin.AbstractNetUtilities.sendEmail(AbstractNetUtilities.java:161) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) com.sun.mail.smtp.SMTPSendFailedException: com.sun.mail.smtp.SMTPSendFailedException: 530-5.7.0 Must issue a STARTTLS command first. For more information, go to 530-5.7.0 About SMTP error messages - Google Workspace Admin Help and review RFC 3207 530 5.7.0 specifications. d2e1a72fcca58-7042eba77e2sm6137676b3a.104 - gsmtp"