Ampm Posted January 5, 2010 Share Posted January 5, 2010 My company have just purchased daq factory and i have no experience of SCADA so here we go, i can create Alarms, but how do i send an email using the alarm as a trigger? Thanks fo any help Link to comment Share on other sites More sharing options...
BeeHay Posted January 7, 2010 Share Posted January 7, 2010 I believe you would add something like this to your "Fire Event" tab under the alarm. if(Alarm.YourAlarm.Fired) email.strHost = "smpt.comcast.net" //Your outgoing mail host. email.strUserName = "xxx@comcast.net" //username email.strPassword = "xxxx" //password email.strTo = "yyyy@email.com" //email to send to email.strReplyAddress = "xxx@comcast.net" //your email email.strSubject = "This is a test email!" //subject email.strFile = "c:\thefileyouwanttoattch.txt" //if you want to attch a file email.Port = "587" //comcast just changed their port to this, make sure this is correct or it wont send! email.strAuthenticate = "NoLogin" //may have to change this based on YOUR settings email.Send() //finally! endif The help section, 12.3, covers ALL of this. Please correct me if I'm wrong AzeoTech! Link to comment Share on other sites More sharing options...
AzeoTech Posted January 8, 2010 Share Posted January 8, 2010 That is almost right, but there is no reason for the if(Alarm...) since this event on triggers when the alarm actually fires. Also BeeHay, be careful about posting code directly out of your app. I went through and cleared out your email info. You left enough that a spammer could utilize your account. Link to comment Share on other sites More sharing options...
BeeHay Posted January 8, 2010 Share Posted January 8, 2010 Those were fake emails. Link to comment Share on other sites More sharing options...
AzeoTech Posted January 8, 2010 Share Posted January 8, 2010 Good, but make it more apparent next time You'd be amazed what sort of secure information gets sent to us over insecure means (cc's over email for example) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.