ATSCADA Advanced Programming: Email, SMS programming

In the SCADA applications, sometimes you need to send notifications email or SMS to your cell phones to know what your machines or processes are doing when you’re not in front of them. Let’s find out how Email, SMS programming on ATSCADA software

Email, SMS programming

Here is an example about sending email notifications and SMS using ATSCADA Alarm Tools by c# language.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Windows.Forms;
using ATSCADA;
using System.Net.Mail;
using System.IO;

namespace EmailSMSProgramming
{

public partial class Form1 : Form
{

public Form1()
{

InitializeComponent();

}
private void btSendEmail_Click(object sender, EventArgs e)
{

ATSCADA.iWinTools.iEmail email = new ATSCADA.iWinTools.iEmail(); // Create email object
string toEmail = “example@gmail.com“;
email.Message.To.Add(toEmail); // Recipients email ID

email.Message.Subject = “Email Subject“; // Email Subject
email.Message.Body = “Text body“; // text body

//Attach files
if (File.Exists(@”C:\Program Files\ATPro\ATSCADA\Reports\DataGeneral” + “.xls”))
{

Attachment _data = new Attachment(@”C:\Program Files\ATPro\ATSCADA\Reports\DataGeneral” + “.xls”);
email.Message.Attachments.Add(_data);

}

//Send email
email.SendEmail(); // send email to recipients
email.Message.Dispose();
email.Dispose();

}

private void btSendSMS_Click(object sender, EventArgs e)
{

//SMS
ATSCADA.iWinTools.iSMS sms = new ATSCADA.iWinTools.iSMS(); // create SMS object
sms.COMPort = “COM11.115200.8.None.One”; // set port for SMS modem
sms.Message = “message content”; // message content

string recipient = “your phone number”; // recipient phone number
sms.Close();
sms.Open();
sms.sendMsg(recipient.Trim()); // send SMS to recipient
sms.DeleteMsg(); // clear SMS
sms.Close();
sms.Dispose();

}

}

}

>> ReferenceEnglish – Traning Cources

Contact:

If you are interested in Email, SMS programming on ATSCADA software. Please contact ATSCADA Lab hotline for quick support.

Thank you.

ATSCADA việt nam

ATSCADA - Providing ATSCADA software - The monitoring and data acquisition control system is the appropriate choice for integrated system projects, IoT, smart city projects, agriculture 4.0... Is trusted by many customers.

Related posts

HOW TO USE SYMBOL FACTORY IN SCADA SOFTWARE

Using Symbol Factory in SCADA software is an outstanding solution for designing HMI or SCADA professionally. Let’s find [...]

Giải pháp kiểm tra tiếp điểm rơ le

Giải pháp kiểm tra tiếp điểm rơ le là một thành phần không thể thiếu [...]

Hướng dẫn sử dụng van bi điều khiển điện

Van bi điều khiển điện được vận hành hoàn toàn tự động bằng điện áp. [...]

Domain, Hosting, VPS, Cloud Server & SSL for SCADA Systems (ATSCADA Platform)

In the era of Industry 4.0, deploying SCADA systems on Web and Cloud platforms is [...]

SSL Certificate for SCADA Web – Secure Your ATSCADA System

Protect Your SCADA Web Data with SSL Encryption Ensure that all data exchanged between your [...]

Register Domain for ATSCADA Web – Secure & Professional Branding

Domain Registration with Viettel IDC A domain name is the unique address of a website [...]

Leave a Reply

T.Vấn Zalo(t.Việt)
ATSCADA Profile.
WhatsApp ( Eng.)
Map (chỉ đường.)