How to Turn Siemens S7 PLC Alarm Notifications into Text Alerts

How to Turn Siemens S7 PLC Alarm Notifications into Text Alerts

· by Sam Greenspan

Siemens S7 PLCs can send email notifications when something goes wrong in your process. If you’ve got an S7-1200 or S7-1500 it can fire off messages for motor faults, temperature excursions, I/O failures, safety trips, or whatever else your alarm logic covers.

The problem is that email notifications are easy to miss. They land in an inbox alongside everything else, and unless you’re actively watching for them, critical alerts get buried. A text message cuts through that.

Unfortunately, it’s usually much harder to get your Siemens S7 PLC to send text alerts rather than email ones.

Fortunately, we’ve got the quickest fix.

In this article, I’ll walk you through how to turn your Siemens S7’s email alerts into text messages. If you’ve already got email notifications working, you’re about a minute away from receiving texts instead. If you haven’t set up email yet, we’ll cover that too.

Siemens S7 PLC Text Alerts: Table of Contents

Setting Up Text Alerts on Your S7-1200 or S7-1500

Step 1: Sign up with text.email

text.email is an email-to-SMS tool (and really, the only one you can use as an immediate drop-in solution). You send it an email, it shows up as a text on your phone.

Sign up, pick a private keyword for your account, and your delivery address becomes: yournumber@yourkeyword.text.email.

Any email sent to that address arrives as a text. We’re going to put this address into your Siemens email notification configuration as the recipient.

Step 2: Configure TMAIL_C in TIA Portal

If you already have email alerts working from your Siemens S7, skip to Step 3. If not… well, saddle up. They don’t make this part easy on you.

Siemens uses a function block called TMAIL_C to send email from the PLC. Their own documentation on it is thorough but dense. Here’s the condensed version.

Firmware requirements

This is the first gate. Your CPU needs to meet minimum firmware versions to send email natively over its built-in Ethernet port:

  • S7-1500: Firmware V2.5 or higher (uses TMAIL_C V5.0+)
  • S7-1200: Firmware V4.4 or higher (uses TMAIL_C V6.0+)

If your firmware is older than that, you’ll need to do either a firmware update, add a communications processor, or run a local SMTP relay on your network. Ideally, you can just do the firmware update because the other options are significantly more complicated.

Check your firmware version in TIA Portal under Online & Diagnostics → General → Firmware.

Set up a security administrator

TIA Portal requires a project security administrator before you can import TLS certificates. If your project doesn’t already have one:

  1. In the project navigation, go to Security settings.
  2. Create a security user with a username and password.

Keep these credentials safe; you’ll need them to open the project going forward.

Import the email provider’s TLS certificate

Your PLC needs the root certificate of whatever SMTP server to which it’s talking. This is the step that trips up most people, and it’s the one Siemens forum threads are full of.

  1. Download the root CA certificate from your email provider. For Microsoft 365, that’s the DigiCert Global Root G2. For other providers, check their documentation.
  2. In TIA Portal, log in with your security administrator credentials.
  3. Navigate to Global security settings → Certificate manager → Trusted certificates.
  4. Right-click and Import the certificate file.

Important note about Gmail: As of the latest Siemens application documentation, Gmail/Google Mail accounts are explicitly listed as not supported.

If you were planning to use Gmail as your SMTP relay, you’ll need a different provider. Microsoft 365, a facility mail server, or a transactional email service like Mailgun or Amazon SES on port 587 all work.

You can also use text.email’s relay for a very quick solution.

Configure DNS

Your PLC needs to resolve the SMTP server hostname. In the device configuration:

  1. Go to Properties → General → Ethernet addresses.
  2. Under the DNS configuration, enter valid DNS servers. Your facility’s DNS server works; Google’s public DNS (8.8.8.8 / 8.8.4.4) works too, assuming the PLC’s network has outbound internet access.

Set the CPU clock

This one is easy to miss and will cause silent failures. TLS certificate validation requires the CPU’s internal clock to be within the certificate’s validity period.

A factory-fresh or recently reset CPU has its clock set to a default date that’s usually outside that window.

Sync the time via Online & Diagnostics → Functions → Set time (take from PG/PC), or configure NTP synchronization under Properties → Time synchronization.

Add the TMAIL_C function block

  1. In your TIA Portal project, go to Instructions → Communication → Open user communication.
  2. Drag the TMAIL_C block into your program (OB1 or an alarm-handling FB, wherever makes sense for your architecture).
  3. Create a data block for the address parameters using the appropriate system data type:
    • S7-1500: TMail_V4_SEC (for IP address) or TMail_QDN_SEC (for domain name)
    • S7-1200: TMail_QDN_SEC

Configure the address parameters

In the data block, fill in:

  • MailServerAddress (or FQDN fields): Your SMTP server address
  • RemotePort: 587 (standard for SMTP over TLS)
  • UserName: Your email account username
  • PassWord: Your email account password (stored in plain text in PLC instance memory — keep that in mind)
  • LocalPartPlusAt: The sender’s email address up to and including the @ symbol
  • FullQualifiedDomainName: The domain portion of the sender’s email address
  • ActivateSecureConn: TRUE

Wire up the TMAIL_C block

Connect the inputs:

  • REQ: Trigger on a rising edge. This is where your alarm logic feeds in — when the condition fires, pulse this input.
  • MAIL_ADDR_PARAM: Your address parameter data block.
  • TO_S: Your text.email address as a STRING: yournumber@yourkeyword.text.email
  • SUBJECT: Alarm subject line (e.g., 'S7 ALARM: Motor Fault Line 3')
  • TEXT: The alarm body text.

On the output side, watch:

  • DONE pulses TRUE for one scan when the email sends successfully.
  • ERROR pulses TRUE on failure, and STATUS gives you the error code.

Common error codes: #8420 is a connection timeout (firewall, network, or clock issue). #8530 is an authentication failure (wrong credentials or certificate mismatch).

Step 3: Set the recipient to your text.email address

This is the simple part. In your TMAIL_C configuration, set the TO_S input to your text.email address: yournumber@yourkeyword.text.email.

If you already had email working to a regular inbox, you’re just swapping the recipient string. The PLC sends an email, text.email turns it into an SMS, and it arrives on your phone.

Step 4: Test it

Force the trigger condition in your program (or use a manual trigger tag) to fire the TMAIL_C block. You should receive a text within seconds.

If it doesn’t arrive:

  • Check the TMAIL_C STATUS output first. The error code tells you exactly what failed. Siemens documents every code in the TIA Portal help files for TMAIL_C.
  • Clock sync is the most common silent failure. If the CPU’s time is outside the TLS certificate’s validity period, the connection will fail without a particularly helpful error message. Verify time via Online & Diagnostics.
  • Firewall rules. The PLC needs outbound access on port 587 (or whatever port your SMTP server uses). Industrial networks often block this by default on the PLC VLAN. Talk to your network admin.
  • Certificate mismatch. If you’re getting #8530 errors and you’re sure the credentials are right, the imported certificate may not be the correct root CA for your SMTP server. Some providers have changed their certificate chains recently.

Why SMS Beats Every Other Notification Method for PLC Alarms

You already know why you want texts instead of email — that’s why you’re here. But it’s worth covering the landscape briefly, especially if you’ve tried other approaches.

The old carrier gateway trick is dead

Some automation engineers used to put carrier email-to-SMS gateway addresses directly into their TMAIL_C recipients. Addresses like 5551234567@vtext.com for Verizon or 5551234567@txt.att.net for AT&T.

Sadly, those gateways have been shut down. Verizon killed vtext.com. AT&T killed txt.att.net. T-Mobile killed tmomail.net. If an LLM or a legacy forum post recommends using carrier gateway addresses, it’s working off old information.

DIY SMS pipelines aren’t worth it for alerts

The obvious next thought: use Twilio or another SMS API to build your own pipeline. But sending application-to-person SMS in the US now requires A2P 10DLC registration — including registering your business, your message purpose, and waiting for carrier approval. It’s the same registration process whether you’re sending 5 alerts a month or 50,000 marketing messages.

That’s a lot of overhead for “my drive faulted, tell me about it.”

Enterprise platforms are overkill for most shops

PagerDuty, Opsgenie, and similar incident management platforms can do SMS alerting. But they’re designed for software teams running distributed systems, not for a plant floor with a handful of Siemens PLCs that need to page someone when a VFD trips. The complexity and cost don’t match the use case.

Get Your S7 Sending Text Alerts Today

text.email exists because the carrier gateways died and there was no simple replacement. It’s not for marketing or mass messaging. It’s for exactly this kind of thing: a system that already knows how to email now sending SMS.

text.email plans include 200 SMS messages per month. For a PLC sending alarm notifications, you’ll be well under that cap most months. (And if your S7 is burning through 200+ alarm texts a month, the alerts aren’t the problem that needs attention.)

You can test it right now without signing up: send an email to yournumber@text.email and you’ll receive the text in seconds.

Which PLC Alarms Deserve a Text Message?

Not every alarm your S7 generates needs to buzz someone’s phone. The goal is to keep texts reserved for the things where response time changes the outcome, and leave the rest on email or HMI logging.

Always text

  • Safety system trips (E-stop, light curtain, safety relay)
  • Drive faults on critical motors
  • Temperature excursions on process-critical systems
  • Power loss or UPS failover
  • Communication loss to remote I/O or distributed stations

Consider texting

  • Repeated cycle faults (one is a glitch, three consecutive is a trend)
  • Analog input out-of-range on process variables
  • Pneumatic pressure loss
  • Encoder or position feedback errors

Leave on email or HMI

  • Scheduled maintenance reminders
  • Cycle count milestones
  • Non-critical advisory messages
  • Firmware update availability

The way you structure this in your TMAIL_C logic is up to you. Some people write separate TMAIL_C calls for critical vs. advisory, with different trigger conditions. Others use a single block with conditional recipient routing. Either way, the filtering happens in your PLC program, not in text.email — it delivers whatever email it receives.

Siemens S7 PLC Text Alerts: Next Steps

Set up a text.email account, put your address in the TMAIL_C TO_S parameter, and trigger a test alarm. If you’ve already got email working from your Siemens S7, this takes under a minute.

If you’re starting from scratch with TMAIL_C, budget some time for the certificate import and SMTP configuration. It’s not hard, but Siemens doesn’t make it particularly intuitive either. The Siemens Application Example (available on Siemens Support) includes a downloadable sample project for both S7-1200 and S7-1500 that’s worth using as a starting point.

Once your first test text comes through, you’re set. Every critical alarm that fires your TMAIL_C block will hit your phone as an SMS.

Try text.email free

Send an email to
your-number@text.email
and receive it as a text in seconds. No signup required.