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
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