Siemens Comfort HMI: Send Multiple Emails

woolie161

Lifetime Supporting Member
Join Date
Aug 2012
Location
Eltham
Posts
73
Hi,
I have been successfully sending emails from a Siemens Comfort HMI (TP1200), configured with a "Gmail" address via VB Script.
The VB script was configured to send 2 emails at the same time, with the follow script, called from a TAG change event. and this has been working for about 2 weeks.

Sub VBFunction_1()
On Error Resume Next
If TAG = True Then
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
End If
End Sub.

If I add 2 more "SendEmail" commands, then no emails are sent!
All email Address are valid and to check spelling etc. the address were copied from my email address book.

Sub VBFunction_1()
On Error Resume Next
If TAG = True Then
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
SendMail "[email protected]", "Subject", "Email Text", "[email protected]"
End If
End Sub.

My question:
Is there a limit to the number of "SendEmail" commands in the single VB Script?
Is it good coding to send 2 emails, then at the end of that "If-Then" routine, repeat the "If-Then" with the next 2 email address'?
Can someone suggest a good alternative for sending multiple emails?

The Comfort Screen is used in a 24/7 production environment, so I want to limit the number of downloads whilst testing my code.
Thanks
Woolie
 
Thanks for replying m_turk,
I had tried separating the different email address' with a semi-colon (;) like outlook does, but the Siemens Comfort screen would not accept that format.
It worked when sending 2 emails
Regards
Woolie
 
Maybe the receiver can be a pool of addresses people rather than single email addresses.
The pool is managed on the receiver rather than by the panel Then you do not have to change the code on the panel if you want to modify the receivers.
 
Hi All,
Thanks for reading the post. I have solved the issue!
It had nothing to do with the VB Script in the Comfort Screen.
As a coincident, it was a security change by Gmail. They have tightened up the security for 3rd party apps accessing / sending emails.
Woolie
 
Hi All,
Thanks for reading the post. I have solved the issue!
It had nothing to do with the VB Script in the Comfort Screen.
As a coincident, it was a security change by Gmail. They have tightened up the security for 3rd party apps accessing / sending emails.
Woolie


Email is so much more complicated than it seems like it should be, because there are so many layers of spam protection built into the infrastructure. It's the worst, but also I'm glad it's there, I guess?



I hear horror stories of people who were trying to selfhost their own email server, and all the crazy hoops they had to go through to get other email platforms to accept their mail, for now, until they changed their mind and there are extra hoops.
 
Email is so much more complicated than it seems like it should be,


It's always been like that: a couple of decades ago, I remember someone saying the O'Reilly guide for sendmail was the only one of the series that could stop a bullet.
 

Similar Topics

Hello great friends. Please help me....what is the easiest way I can RESET a Siemens TP700 COMFORT HMI Touch panel, to its Default...
Replies
1
Views
1,237
Hello Experts, Hopefully I have an easy to answer question. I am remotely connected to a S7-1500 with TIA Portal V16 & a Comfort TP1200...
Replies
0
Views
840
Does anyone know if it's possible to display the alarm Log with just the on State of an Alarm and not the Off state.
Replies
0
Views
997
I'm putting together a system with a Redundant S7-1500 CPU and 2 Comfort HMI’s on an MRP ring. The HMI’s will be doing the same job and only one...
Replies
3
Views
1,733
I need to confirm that the can we convert the KTP1200 Basic PN to TP1200 Comfort HMI. I am using TIA Ver 14 and it shows the Device change option...
Replies
1
Views
2,238
Back
Top Bottom