In vision I use the code below to send an email based on a script. When I try it in perspective I get an error that connection is refused. What in perspective would be causing this? The code is identical in both vision and perspective. Works in vision but not perspective.
recepients = [“XXXX@XXXX”]
server = smtplib.SMTP(‘XXXXXXX’,25)
msg = “”“TESTING
\n\nThis is a test.
I’m not sure what the difference would be but perhaps client vs gateway scope.
I will suggest looking into system.net.sendEmail() to see if that resolves your issue.
Where were you running it in Vision? Perspective code is always executed on the gateway.
I was running the designer on my business network pc but the gateway is on the industrial side. So it was working when running vision on the business network pc. Once I tried it on the industrial side, neither the vision or perspective code works. Thanks, for making that clear to me now.