Simple Example for Sending Email from NetLinx
Frequently Asked Questions
Brand:
- AMX
Models:
- NetLinx
Question:
Can I configure NetLinx to send an email?
Answer:
Yes, refer to NetLinx Keywords Help for additional help on SMTP.
Here is a simple example:
PROGRAM_NAME='SMTP Send'
DEFINE_DEVICE
dvTP = 10001:1:0
dvEmail = 0:3:0
DEFINE_START
SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS, 'smtp.gmail.com')
SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'587')
SMTP_SERVER_CONFIG_SET(SMTP_USERNAME, 'first.last@gmail.com')
SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD, '1988')
SMTP_SERVER_CONFIG_SET(SMTP_FROM, 'first.last@gmail.com')
SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_TRUE)
DEFINE_EVENT
BUTTON_EVENT[dvTP,1] //with attachment
{
PUSH:
{
SMTP_SEND(dvEmail, 'my.client@yahoo.com' , 'Subject' , 'Body' , 'attachment.txt')
}
}
BUTTON_EVENT[dvTP,2] //without attachment
{
PUSH:
{
SMTP_SEND(dvEmail, 'my.client@yahoo.com' , 'Subject' , 'Body' , NULL_STR)
}
}