Email function
Website: [Link]
Technical Support: support@[Link]
Skype: fcwkkj
Phone: 86-591-87868869
QQ: 1043098682
Technical forum: [Link]
Email function
1. General
WECON HMI can support setting some specified conditions to make the specified mail information are sent
to the relevant recipient, but email sending is basis of the network.
Note:
Email function is available in special HMI model, when you purchase HMI, please tell sales whether you
need email function.
2. Email function settings
In the toolbar of the programming software, select "Mail" in "Library", and the following mail configuration
interface pops up.
Figure 2-1
1 WECON Technology Co., Ltd.
Email function
1) Sender name: Fill in the sender's name, case sensitive, the user can enter letters, numbers, but cannot
contain English symbols, and the length does not exceed 32. Such as WECONSupport;
2) Email address: Fill in the sender's email address, case sensitive, but the length does not exceed 32.
Such as support@[Link];
3) Password: Fill in the password or authorization code of the mailbox. If the server needs to set the
authorization code, the authorization code must be used. If the authorization code is not used, the
password is used. Please refer to the SMTP service in the mailbox for the authorization code
information. It case sensitive, the length does not exceed 32;
4) Confirm Password: Fill in the password or authorization code of the mailbox again;
5) SMTP server: Please refer to the mailbox account settings, such as [Link];
6) The port number: Please refer to the mailbox account settings, such as 465;
Note: gmail also needs to enable the "allow unsafe apps" option in the account, otherwise the mail will
not be sent normally.
7) Encryption type: SSL is a security protocol that provides security and data integrity for network
communications. It encrypts network connections at the transport layer; TLS (STARTTLS) upgrades
connections to SSL instead of using a separate encrypted communication port;
8) Error message: Set the error message receiving address, the user can use the information to query the
cause of the error.
The error types in the mail function are divided into two types: custom rule error and server return
error.
Table 2-1 Custom rule error
Message
Email settings are incorrect
Email account is incorrect
Email password cannot include blank
the settings of SMTP server are incorrect
The range of SMTP server ports number should be integer, which is between 1 and 65535.
The type of encryption for SMTP is incorrect
The name of sender or email address setting is incorrect.
The names of Recipients or email address setting are incorrect.
The names of CC recipients or email address setting are incorrect.
The names of Secret delivery recipients or email address setting are incorrect.
Email topic cannot be blank
Email content cannot be blank
Total size of attachments should be below 25M
Attachment “xxxx” is nonexistent
2 WECON Technology Co., Ltd.
Email function
Table 2-2 Server return error
Message
smtp-server: 554 DT: SPM
smtp-server: 550 RP: TRC
smtp-server: 550 Connection frequency limited
smtp-server: 535
smtp-server: 550 Error: content rejected
smtp-server: 451 Internal server error
smtp-server: 535 Invalid login user or password
smtp-server: 550 too many email send today
smtp-server: 452 Too many recipients received this hour.
smtp-server: 535 Error: authentication failed, system busy
could not connect: Connection timed out
Unexpected EOF on SMTP connection
could not initiate SSL/TLS connection
smtp-server: 530 Must issue a STARTTLS command first.
Could not resolve host
could not connect: Connection timed out
could not connect: Connection refused
smtp-server: 550 User not found: [Link]
9) Manual trigger: It is for modify the email sending settings when HMI is running; According to the set
manual trigger address, the address is offset backward to get the address of the corresponding
function (a total of 201 words). Take HDW100 as an example
Table 2-3
Address Description
100.0 Sending trigger
101.0-101.15 It is used for triggering recipient groups, for example, HDW101.0 set ON,
and the address in group 1 will be in recipient list.
103.0-103.15 It is used for triggering recipient groups, for example, HDW103.0 set ON,
and the address in group 1 will be in CC list.
105.0-105.15 It is used for triggering recipient groups, for example, HDW105.0 set ON,
and the address in group 1 will be in BCC list (Secret delivery).
107-171 The subject length is limited to 64 words. (If it exceeds, it will intercept 64
words of content)
172-300 The content length is limited to 128 words. (If it exceeds, it will intercept
3 WECON Technology Co., Ltd.
Email function
128 words of content)
301.0 Whether to send an alarm record attachment (a file named
[Link])
10) Note:
The email sent manually is sent without priority (bit change, rising edge, falling edge, and the
email triggered by the timing condition needs to be queued in the order of triggering. The
maximum value is 100. If it is added, it will be discarded.) The email is being sent, and the email is
sent as soon as the current email is sent.
In the rising edge trigger mode, if the HMI is sending an email, the trigger signal is invalid. Only
after the email is sent, a new email is generated and sent. Regardless of whether the mail is sent
successfully or not, the bit address will be reset;
In manual mode, the email will only be sent once, regardless of whether the transmission was
successful or failed.
3. Sending settings
Users can configure the content of the email according to the actual situation. This chapter describes how
to set up sending mail.
4 WECON Technology Co., Ltd.
Email function
3.1 Mailing list settings
Figure 3-1
The mailing list as Figure 3-1 shows.
1) New: Create a new email to be sent, and you can create up to 1024 emails;
2) Modify: Select an email to modify the content and configuration of the modified email;
3) Delete: delete the selected email; click the ID item in the first column to delete multiple emails;
3.2 Sending settings
The sending settings for email as Figure 3-2 shows:
5 WECON Technology Co., Ltd.
Email function
Figure 3-2
1) Theme: It can be empty, case sensitive, the user can enter letters, numbers, but cannot contain English
symbols, and the length does not exceed 32;
2) Content: It contains text, alarm text and variable, as Figure 3-3 shows; the list supports up to 32 items,
and the total length of the preview does not exceed 1024;
Text: It can support 8 languages, but only three in settings screen, please click “Edit All Texts” for
more languages, the total length does not exceed 1024;
Alarm: It support bit alarm and word alarm, users can select items from alarm settings directly.
When the alarm text changes, the content of the email also changes, case-sensitive, and the length
does not exceed 253.
Variable: The user can set the corresponding variable address, read a value or a string according to
the specified format, and display the read information in the corresponding position in the mail
content.
6 WECON Technology Co., Ltd.
Email function
Figure 3-3
3) Preview: It combines and displays the currently edited message content, making it easy for users to
adjust the content. The total length of its preview does not exceed 1024;
4) Sending method: There are two methods for sending, one is cycle, and the other is trigger;
Timed send interval: The timing transmission interval starts after the current system time starts
after the power is turned on. The minimum time is set to 5 minutes.
Bit address trigger transmission: When the set trigger address meets the trigger condition, the
email is sent to the set recipient by email. If the alarm text information is selected for the content
of the email, the address of the alarm is automatically written to the trigger address. There are
three conditions for triggering: send on rising edge, send on falling edge, and send when bit
changes.
5) Recipient, CC, Secret delivery: Recipients are set up as groups, and multiple groups can be sent, and
each group can have multiple recipients. Cc is to send the current mail to other recipients at the same
time. Bcc (secret delivery) is to send the current message to other recipients at the same time, but the
recipient and the CC recipient will not see the Bcc. When sending a message, the recipient must be set,
but the CC and Bcc can be left unset. The total number of recipients, CCs and Bccs does not exceeds
40
7 WECON Technology Co., Ltd.
Email function
3.3 Recipient
Figure 3-4
1) New: Add a recipient, for create an new recipient, only need to fill in the recipient's name and email
address. When dynamic recipients are enabled, the above recipient name and email address editing
are forbidden to be entered. The dynamic address can only be edited at the address editor, the total
length of email does not exceed 32. And only 42 recipients can be supported in one HMI project;
2) Modify: Select a recipient and click the modify button, or double-click recipient to modify. Users can
modify its name and email address, and the email address is unique. If it is a dynamic recipient, users
can modify the address and the dynamic recipient address;
3) Delete: Select one recipient or multiple recipients to delete, click the ID item in the first column to
perform a full selection operation;
4) Number of groups: Users can increase the group and decrease the group by clicking the up and down
arrows. The default number of groups is one, and the maximum number can be increased to 16
groups;
5) Description: the description is for group. The length of the description does not exceed 32;
3.4 Sending test settings
This is used for test the sender and recipient settings
8 WECON Technology Co., Ltd.
Email function
Figure 3-5
1) Test: When this button is clicked, PI Studio will automatically send an email to the specified recipient
group to verify that the SMTP settings are correct;
Note:
1) This window can only be opened after the SMTP server is set up.
2) When testing with zoho mailbox, there will be a delay, and the delay time is within 3 minutes.
3) The custom error message for the test is as follows:
Table 3-1
Error code Description
0 CSMTP_NO_ERROR
100 WSA_STARTUP = Unable to initialize winsock2
101 WSA_VER = Wrong version of the winsock2
102 WSA_SEND = Function send() failed
103 WSA_RECV = Function recv() failed
104 WSA_CONNECT = Function connect failed
105 WSA_GETHOSTBY_NAME_ADDR = Unable to determine remote server
106 WSA_INVALID_SOCKET = Invalid winsock2 socket
107 WSA_HOSTNAME = Function hostname() failed
108 WSA_IOCTLSOCKET = Function ioctlsocket() failed
109 WSA_SELECT
110 BAD_IPV4_ADDR = Improper IPv4 address
200 UNDEF_MSG_HEADER = Undefined message header
201 UNDEF_MAIL_FROM = Undefined mail sender
202 UNDEF_SUBJECT = Undefined message subject
203 UNDEF_RECIPIENTS = Undefined recipient
204 UNDEF_RECIPIENT_MAIL = Undefined mail recipent
205 UNDEF_LOGIN = Undefined user login
206 UNDEF_PASSWORD = Undefined user password
207 BAD_LOGIN_PASSWORD = Invalid user login or password
208 BAD_DIGEST_RESPONSE = Server returned a bad digest MD5 response
9 WECON Technology Co., Ltd.
Email function
209 BAD_SERVER_NAME = Unable to determine server name for digest MD5 response
300 COMMAND_MAIL_FROM = Server returned error after sending MAIL FROM
301 COMMAND_EHLO = Server returned error after sending EHLO
302 COMMAND_AUTH_PLAIN = Server returned error after sending AUTH PLAIN
303 COMMAND_AUTH_LOGIN = Server returned error after sending AUTH LOGIN
304 COMMAND_AUTH_CRAMMD5 = Server returned error after sending AUTH CRAM-MD5
305 COMMAND_AUTH_DIGESTMD5 = Server returned error after sending AUTH DIGEST-MD5
306 COMMAND_DIGESTMD5 = Server returned error after sending MD5 DIGEST
307 COMMAND_DATA = Server returned error after sending DATA
308 COMMAND_QUIT = Server returned error after sending QUIT
309 COMMAND_RCPT_TO = Server returned error after sending RCPT TO
310 MSG_BODY_ERROR = Error in message body
400 CONNECTION_CLOSED = Server has closed the connection
401 SERVER_NOT_READY = Server is not ready
402 SERVER_NOT_RESPONDING = Server not responding
403 SELECT_TIMEOUT
404 FILE_NOT_EXIST = File not exist
405 MSG_TOO_BIG = Message is too big
406 BAD_LOGIN_PASS = Bad login or password
407 UNDEF_XYZ_RESPONSE = Undefined xyz SMTP response
408 LACK_OF_MEMORY = Lack of memory
409 TIME_ERROR = time() error
410 RECVBUF_IS_EMPTY = RecvBuf is empty
411 SENDBUF_IS_EMPTY = SendBuf is empty
412 OUT_OF_MSG_RANGE = Specified line number is out of message size
413 COMMAND_EHLO_STARTTLS = Server returned error after sending STARTTLS
414 SSL_PROBLEM = SSL problem
415 SSL_PROBLEM = SSL problem
416 STARTTLS_NOT_SUPPORTED = The STARTTLS command is not supported by the server
417 LOGIN_NOT_SUPPORTED = AUTH LOGIN is not supported by the server
Version: V1.0.0
10 WECON Technology Co.,
Ltd.
Email function
Date: April 2019
11 WECON Technology Co.,
Ltd.