Crimson® 3.2 can send an email or a Short Message Service (SMS) text message when an alarm occurs, or whenever a program asks it to. This article shows how to set this up: the SMTP Client in the Device Configuration sends email, and the Mail Manager in Communications holds the device's name and the address book of contacts.
This article applies to devices configured with Crimson 3.2: FlexEdge™ DA50A and DA70A, Graphite™ HMIs, the Graphite Edge Controller, CR1000 and CR3000 HMIs, and DA10D and DA30D Data Stations. The functions available depend on the hardware model, the software group and the communications hardware installed, so not every device supports every feature in this article. SMS needs compatible cellular hardware. The screenshots use a FlexEdge DA50A as the example device.
For Crimson 2.0, 3.0 and 3.1, where the mail server is set up in the Mail Manager itself, see Crimson 2.0/3.0/3.1: How to Configure the Mail Manager for Email and SMS Notifications.
Note: Crimson can send email, but it can't receive it.
Email, SMS and Email-to-SMS Gateways
Crimson can deliver a message in two ways. Make sure you know which one you need before you start:
- SMTP email: the device sends email through a mail server (SMTP server) over its network connection. This needs a network route to the server, but no cellular modem. Parts 1 to 3 cover it.
- Native cellular SMS: the device sends a text message itself, through a cellular modem fitted in the device. This needs no mail server. Part 4 covers it.
Some mobile carriers have offered email-to-SMS gateways, which turn an email sent to a special address into a text message. To Crimson, this is ordinary SMTP email. Carriers can limit or withdraw these gateways, so don't rely on one for alarms without confirming with your carrier that it is still available.
Preparation
- Software and configuration:
- Crimson 3.2 installed on your PC, and the device's database open.
- The details of the mail server (SMTP server) you will send through: server name or IP address, port, whether it uses TLS or STARTTLS, and a user name and password if it needs a logon. Your IT department or email provider can give you these.
- A network configuration that reaches your mail server: a gateway and, if you use a server name, a DNS server.
- The correct date and time on the device, set by the Time Sync service in the System Configuration. The device needs an accurate clock to validate the mail server's TLS certificate.
- Hardware:
- For email: a device with a network connection to your mail server, for example Ethernet or cellular.
- For SMS: compatible cellular hardware, such as a Cellular Modem sled in a FlexEdge, an active SIM with SMS service, and registration on the cellular network.
Part 1: Set Up the SMTP Client
Step 1: Enter the Mail Server Settings
- Navigate to Device Configuration > System Configuration > Services > SMTP Client.
- On the Settings tab, set the following:
- Server Mode: Smart Host. This is the only mode Crimson supports: it sends every message to the server you name below.
- Server Name: the DNS name or IP address of your mail server; smtp.example.com in this example.
- Port Number: the port your server uses. The default is 25, but many servers use another port; 587 in this example.
- Connection Type: TCP (no encryption), TLS (encrypted from the start of the session), or TCP+STARTTLS (starts unencrypted, then switches to TLS before the logon). Use an encrypted connection, TLS or TCP+STARTTLS, whenever your server supports one; TCP+STARTTLS in this example.
- Logon Mode: None, Plain, or Digest, as your server requires. Use Plain only with TLS or TCP+STARTTLS, because it sends the password as it is.
- User Name and Password: the account the device logs on with.
- Under Message Originator, set the sender details. They go into the From header of each message and the MAIL FROM command:
- Domain: your mail domain; example.com in this example.
- Name: the sender name recipients see; Line 1 FlexEdge in this example.
- Email: the sender address. Many servers accept only the address of the account you log on with.
Step 2: Set the TLS Options
If Connection Type is TLS or TCP+STARTTLS, open the TLS Options tab. It controls how the device checks the mail server's certificate:
- CA Source: the certificate authorities the device trusts. Start with Default CAs. It uses the certificates in the Default CAs section of the System Configuration or, if you haven't added any there, a built-in set of commonly trusted certificate authorities. That set is intended for Internet-facing servers with certificates from commercial certificate providers. Specified Below lets you upload the server's CA certificate instead, and the list also offers any certificates in the Trusted Certs section.
- CA Checks: what the device checks in the server's certificate: Trust (the default), Trust, Name, or Trust, Name, Date. Set Trust, Name, Date where your device offers it. It needs the device's date and time to be correct, and the Server Name in Step 1 to match the name in the server's certificate.
If the certificate check fails, check the device's date and time, the Server Name, the firmware version and the server's certificate chain. If the server uses a certificate from a private or company certificate authority, add that CA's certificate to Default CAs or Trusted Certs under System Configuration > Security and select it here.
Note: Setting CA Source to None turns off the certificate check. Don't use it as a fix on a production system: the device then can't tell whether it is talking to your real mail server.
Part 2: Set Up the Mail Manager
Step 1: Name the Device
- Navigate to Communications > Services > Mail Manager.
- On the Mail tab, set the following:
- Unit Name: a name that identifies the device that sent the message, such as the machine or site it monitors. The default is Crimson Device; Line 1 FlexEdge in this example.
- Date Format: the date format used in messages; Locale Default in this example.
Step 2: Add Contacts
- Under List of Contacts, click Edit Contacts.
- For each contact, enter the following:
- Name: the name shown in Crimson's contact lists, such as Maintenance.
- Address(es): for email, an address in the usual name@domain format. For SMS, a phone number in international format without the leading plus sign (country code first, numbers only). To send email to several addresses at once, separate them with semicolons.
- Enable: optional. An expression that turns messages to this contact on or off. It is true by default.
- Click OK.
Note: Create separate contacts for email recipients and SMS recipients, as in the example above. Don't put email addresses and phone numbers in the same contact.
Note: Contacts are numbered from 0. Programs that use the SendMail function refer to a contact by this number.
Part 3: Send Email
Step 1: Send an Email When an Alarm Occurs
- Navigate to Data Tags and select the tag that has the alarm; Tag1 in this example.
- Click the Alarms tab.
- Set up the alarm (Event Mode, Event Name, Value) if you haven't already; an Absolute High alarm named High Pressure in this example.
- Set Mail To to the contact who should receive the message; Maintenance in this example. The list shows the contacts from Part 2.
Step 2: Send an Email from a Program or Action
Use one of these functions in a program or in an action such as a button's or an alarm's On Active. Each one adds the message to the device's mail queue and returns at once.
- SendMail(rcpt, subject, body) sends to a contact by its number in the list of contacts, for example SendMail(0, "Test Subject Line", "Test Body Text") sends to contact 0.
- SendMailTo(rcpt, subject, message) sends to the addresses you give it, separated by semicolons, for example SendMailTo("name1@example.com;name2@example.com", "Subject", "Message").
- SendMailToAck(rcpt, subject, message, ack) works like SendMailTo, and also adds 1 to the tag you give as ack each time a message is sent successfully. Use it to check that your settings work.
The Crimson Reference Manual (Help > Reference) describes these functions, and SendFile and SendFileEx for sending files.
Step 3: Test the Notification
- Download the database to the device.
- Trigger a test alarm, or run a test SendMail, SendMailTo or SendMailToAck.
- Confirm that each contact receives the message, and that the Unit Name identifies the device. If nothing arrives, see the troubleshooting in Part 5.
Part 4: Send and Receive SMS (Optional)
Step 1: Set the Modem's SMS Mode
This example uses a FlexEdge with a Cellular Modem sled.
- Check that the cellular modem is set up and registered on the network, with a SIM that has SMS service.
- Navigate to Device Configuration > System Configuration > Network > Interfaces > Modem 1 and click the Features tab. The modem's number can differ, depending on the hardware installed.
- Set SMS Mode:
- Send: for outbound SMS notifications. This is the default.
- Send and Receive: if your application also needs to receive SMS messages.
If SMS Mode is unavailable or grayed out, click the modem's Settings tab and check that Port Mode is not set to Disabled. For a standard cellular configuration, select Standard Interface, then return to the Features tab to set SMS Mode. Standard Interface is not the only mode that works; any Port Mode other than Disabled makes SMS Mode available.
Step 2: Send SMS
- Send to a contact whose address is a phone number, from an alarm's Mail To or a program, in the same ways as email in Part 3.
- Test it as in Part 3, Step 3.
Note: The SMS Client page and the Mail Manager's SMS tab appear whether or not a modem is fitted, so seeing them doesn't mean your hardware can send SMS. You don't need the SMS Client, Message Relay or On Message settings below for basic outbound SMS alarms.
Step 3: Pass Received SMS to Crimson
To receive SMS messages, set the modem's SMS Mode to Send and Receive (Step 1). The SMS Client then handles incoming messages.
- Navigate to Device Configuration > System Configuration > Services > SMS Client.
- Set Message Routing to Pass to Crimson, so the Mail Manager handles incoming messages. Disabled discards them. Process as Command isn't supported yet.
Step 4: Set Up the SMS Tab
- Navigate to Communications > Services > Mail Manager and click the SMS tab.
- Set the following, if you need them:
- Message Relay: Enabled lets a recipient reply to a message that was sent to several contacts, and the device passes the reply on to the others. Disabled by default.
- On Message: an action that runs each time a message arrives. In it, Data holds the message: the sender's number, a colon, then the text. For example, Hello World from 1-555-555-0100 arrives as 15555550100:Hello World.
Note: Processing received messages further with Crimson programs is not covered in this article.
Part 5: Troubleshooting
If a test message doesn't arrive, check these in order:
- DNS: if Server Name is a name, the device needs a working DNS server. Try the server's IP address to rule DNS out (with Trust, Name checks, put the name back afterwards, because the certificate holds the name, not the address).
- Gateway and route: the interface the device sends through needs a gateway that reaches the mail server. A firewall between them must allow the SMTP port outbound.
- SMTP port: Port Number and Connection Type must match each other and your server. Some Internet providers block port 25, which is one reason servers use other ports. Take the values from your provider or IT department.
- Authentication: check the Logon Mode, User Name and Password. Many providers no longer accept an ordinary account password from devices (see the questions below).
- TLS certificate: see Part 1, Step 2.
- Device time: a wrong date or time makes the certificate check fail. Check the Time Sync settings.
- Sender address: many servers reject a message whose Email under Message Originator isn't the logon account, or isn't a domain the server accepts.
- SMS: check the signal, network registration, the SIM's SMS service, the modem's SMS Mode, and that the phone number is in international format without the plus sign.
Part 6: Frequently Asked Questions
Question: I use Crimson 3.1 or earlier. Where are the SMTP settings?
Answer: In Crimson 3.1 and earlier, the mail server is set up in the Mail Manager itself. See Crimson 2.0/3.0/3.1: How to Configure the Mail Manager for Email and SMS Notifications.
Question: How do I send email through Gmail?
Answer: Gmail doesn't accept your ordinary account password from devices like this, and you shouldn't turn on "less secure app" access. Depending on your account and your organization's policy, Google may let you create an app password for the device (it needs 2-Step Verification). If you can, enter it as the SMTP Client's Password. See Google's help on app passwords and Crimson 3.x: Set up Gmail App Password. If app passwords aren't available to you, use an SMTP relay approved by your IT department.
Question: Can I send email through Microsoft 365 (Office 365)?
Answer: Microsoft is deprecating Basic authentication (a user name and password) for SMTP in Microsoft 365. The Crimson 3.2 SMTP Client logs on with a user name and password (Logon Mode None, Plain or Digest). Ask your IT department which option they support, using Microsoft's How to set up a multifunction device or application to send email using Microsoft 365 or Office 365. Where the device can't log on to the provider directly, send through an SMTP relay that your IT department approves.
Question: What server settings does my email provider use?
Answer: Providers change their server names, ports and logon rules, so take them from your provider's current documentation or from your IT department.
Question: Can Crimson receive email?
Answer: No. Crimson can send email, and with a cellular modem it can send and receive SMS.
References
- Crimson 3.2 Software Guide (LP1153, Revision F, September 2025), from the Support tab of the Crimson software page: supported products (page 3), modem Features tab and SMS Mode (page 47), SMS Client (page 75), SMTP Client and TLS Options (pages 76 and 77), Default CAs and Trusted Certs (page 83), and Using Electronic Mail (pages 306 and 307).
- The settings in this article come from the Crimson 3.2 Software Guide and the Crimson 3.2 configuration pages. Sending through specific providers such as Gmail and Microsoft 365, and sending and receiving SMS on cellular hardware, have not been individually tested.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
HMS Technical Support
If you have any questions or trouble contact HMS Technical Support by clicking here.