Appendix C: Smtp Support; Overview; Smtp Server Configuration - AMX NX-1200 Webconsole And Programming Manual

Nx-series controllers, enova dvx all-in-one presentation / digital media switchers, massio controlpads
Table of Contents

Advertisement

Appendix C: SMTP Support

Overview

NetLinx Integrated Controllers (Masters) have built-in support for transmission or email via an SMTP server. NetLinx Master
support includes the configuration of a single outbound SMTP server and the subsequent transmission of individual emails via the
configured server.
NOTE: When using Google Gmail, you may receive an authentication error when generating outbound emails over SMTP from an NX
Master. If you receive this error, turn on "Access for less secure apps" on your Google account (found under My Account). If this
option is turned off, you may receive the authentication error.
SMTP Server Conf iguration
The SMTP Server is configured by specifying a set of server properties. SMTP server properties once set are persistent on the
master until they are reset to a different value. SMTP server properties include the server IP address or URL, the SMTP IP port
number for connecting to the server, any username and password that is required for connecting with the server, the "from"
address that will be associated with all outgoing messages and finally a flag indicating if the server must support TLS
authentication security in order to establish a connection. Properties are set and read using two built-in NetLinx functions:
SMTP_SERVER_CONFIG_SET(CONSTANT CHAR cfgName[], CONSTANT CHAR cfgValue[])
Sets a server configuration parameter. These configuration settings are general mail server settings and thus apply to all
emails. Settings are saved to the configuration database & thus are static upon reboot.
cfgName is the server property name that is being set. Acceptable values are
ADDRESS - SMTP server name, such as "mail.amx.com". The maximum number of characters allowed for email destination

is 127.
PORT - SMTP server port, such as "25" or "0". 0 means "use the best default port" which would imply using 25 which is the

SMTP well-known port.
USERNAME - User name to offer for authentication. If user name length is set to 0, authentication is not attempted.

PASSWORD - Password to offer for authentication. If password length is set to 0, authentication is still attempted but simply

uses a zero-length password.
FROM - Mail address to populate to the 'Mail-From:' field in outgoing emails.

REQUIRE_TLS - SMTP server must support TLS in order to establish a connection. Valid values are 'TRUE' or 'FALSE'

cfgValue is the value to associate for a setting property.
char[] SMTP_SERVER_CONFIG_GET (CONSTANT CHAR cfgName[])
Queries a server configuration property. Returns the config property value.
cfgName is the server property name that is being retrieved. Acceptable values are a subset of the settable properties
(username & password query are disabled as a security precaution). No return value
ADDRESS - SMTP server name, such as "mail.amx.com". The maximum number of characters allowed for email destination

is 127.
PORT - SMTP server port, such as "25" or "0". 0 means "use the best default port" which would imply using 25 which is the

SMTP well-known port.
FROM - Mail address populated to the 'Mail-From:' field in outgoing emails.

REQUIRE_TLS - SMTP server must support TLS in order to establish a connection. Valid values are 'TRUE' or 'FALSE'

The NetLinx .axi file has the following built in constants to ease configuration:
CHAR SMTP_ADDRESS[] = 'ADDRESS';
CHAR SMTP_PORT_NUMBER[] = 'PORT';
CHAR SMTP_USERNAME[] = 'USERNAME';
CHAR SMTP_PASSWORD[] = 'PASSWORD';
CHAR SMTP_REQUIRE_TLS[] = 'REQUIRE_TLS';
CHAR SMTP_FROM[] = 'FROM';
CHAR NULL_STR[] = '';
CHAR SMTP_TLS_TRUE[] = 'TRUE';
CHAR SMTP_TLS_FALSE[] = 'FALSE';
Example server configuration:
SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,'mail.mymailserver.com')
SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'25')
SMTP_SERVER_CONFIG_SET(SMTP_USERNAME,'myAccountUsername')
SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD,'myAccountPassword')
SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS, SMTP_TLS_TRUE)
SMTP_SERVER_CONFIG_SET(SMTP_FROM,'John Doe')
NX-Series Controllers - WebConsole & Programming Guide
Appendix C: SMTP Support
140

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents