IMDTouchKnowledge BaseShop main store

Troubleshooting

Why WinCC flexible email fails with a connection error

HMI and touchscreens Published 6 min read

Short answer

No Siemens mail module is needed: the WinCC flexible runtime on the TP177B is the SMTP client, and its RJ45 port reaches a router like any IP node. Gmail requires TLS on submission ports 465 and 587, which the old runtime is reported not to negotiate, so point the panel at a local relay on port 25 and let the relay handle TLS upstream.

On this page
  1. Do I need a special Siemens module to send email from a TP177B?
  2. Why does PROFINET work while the email shows a connection error?
  3. Where do the SMTP settings live in WinCC flexible?
  4. Is 192.168.0.125 with mask 255.255.255.0 and gateway 192.168.0.1 workable?
  5. Why does smtp.gmail.com refuse the panel's connection?
  6. What is the fix when the panel cannot negotiate TLS?
  7. How do I test one stage at a time?
  8. Can an alarm send the email instead of a button?
  9. Questions asked

No special Siemens mail module is needed. The WinCC flexible runtime on the TP177B is the SMTP client, and its RJ45 port carries ordinary IP traffic to a router like any other Ethernet node. Your numbers — 192.168.0.125, mask 255.255.255.0, gateway 192.168.0.1 — are internally valid, so the connection error is almost certainly not addressing. The likely culprit is security: smtp.gmail.com accepts submission only over TLS on ports 465 and 587, and the WinCC flexible mail function is reported to speak plain SMTP on port 25. Submit to a local relay instead, and let the relay negotiate TLS upstream.

Do I need a special Siemens module to send email from a TP177B? #

No. The WinCC flexible runtime on the panel is the mail client, the RJ45 interface forwards standard IP traffic through your router, and no PLC-side hardware joins the path — a Siemens mail function belongs to controllers that carry one, not to this panel.

When the HMI originates the message, your CPU 315-2DP is not in the transport path at all; it matters only if a tag supplies message text or the send trigger. Newer controllers do send mail themselves — the S7-1500 family does it with its TMAIL_C block and TLS certificates — but bolting communication hardware onto a 315-2DP cannot supply a missing default gateway, a DNS server or a TLS stack on the panel. Decision: wire the RJ45 into the router and fix the panel's own settings.

Why does PROFINET work while the email shows a connection error? #

Because PROFINET traffic to your CPU 315-2DP never leaves the local subnet, while email needs name resolution, a default route and an encrypted session — and one generic error message covers every stage without telling you which one failed.

Treat "connection error" as "the SMTP session did not complete", nothing more. Enabling the PROFINET option in the panel settings configures controller communication; it adds no default route and no DNS entry. Split the path into stages before changing anything:

  • No event runs and no packet leaves the panel — event stage: check the button assignment and the recipient fields before touching the network.
  • A DNS query leaves but no address returns — name resolution: the panel has no working DNS server entry.
  • The name resolves but no connection attempt follows — routing or filtering: default gateway, router policy, firewall.
  • The connection opens and closes during the security handshake — encryption: the runtime cannot negotiate what the server demands.
  • The session stands but the message is refused — authentication or provider policy: credentials and sender identity.

A test button is the right tool here: one press, one send attempt, no PLC logic and no alarm state in the way.

Where do the SMTP settings live in WinCC flexible? #

In the project, under Device Settings > General > SMTP Settings for the server entry, while the IP address, mask, gateway and DNS live in the panel's own settings — a download moves the first group and never the second, so re-transferring alone fixes nothing.

Siemens documents the project location as Device Settings > General > SMTP Settings; server, sender and account go there. On the panel, the Internet settings area holds the address 192.168.0.125, the mask 255.255.255.0 and the gateway 192.168.0.1 — plus a DNS server, which is a separate entry: a default gateway is not a DNS setting, and smtp.gmail.com cannot be reached as a name without one. The TIA Portal generation moved this into the panel's control panel as a WinCC Runtime Advanced Internet dialog with an E-mail tab.

Is 192.168.0.125 with mask 255.255.255.0 and gateway 192.168.0.1 workable? #

Yes as local addressing: the panel lands in network 192.168.0.0/24, gateway 192.168.0.1 lies inside that same network, so the panel hands outbound traffic straight to the router — nothing in these three numbers explains your error.

Run the arithmetic once on your own values:

  • Panel address 192.168.0.125, last octet 125 = 01111101 in binary.
  • 255.255.255.0 AND 192.168.0.125 = 192.168.0.0: the first three octets pass the mask, the last is masked off.
  • 255.255.255.0 AND 192.168.0.1 = 192.168.0.0 as well.

Both sit in 192.168.0.0/24, so the panel delivers to the router directly, with no intermediate hop to configure. Decision: keep these numbers. What they do not prove is threefold — that the router actually owns 192.168.0.1, that no second device holds 192.168.0.125 (a conflict makes the failure intermittent, the way it breaks any HMI session, as in why a PC fails to reach an HMI when Wi-Fi owns its address), and that a DNS server is entered and reachable.

Why does smtp.gmail.com refuse the panel's connection? #

Because Google takes submission only over TLS — port 465 with implicit TLS or 587 with STARTTLS — with an app password, while the WinCC flexible mail function is reported to support plain SMTP on port 25, and the SSL option you enabled does not add the missing negotiation.

Read that SSL checkbox as a claimed client capability, not as proof the runtime performs the TLS method a given server requires. The signature of this failure is a connection that opens and then dies mid-handshake: routing worked, encryption did not. Decision for this runtime against this provider: stop pursuing smtp.gmail.com directly. No gateway change, DNS entry or PLC module closes a TLS capability gap.

What is the fix when the panel cannot negotiate TLS? #

Put an SMTP relay on your own network: the panel submits to it on plain port 25 inside the LAN, and the relay authenticates to your provider over TLS with real credentials — one box holding two different conversations.

  1. Place the relay on a network the panel reaches directly or through 192.168.0.1.
  2. Let it accept submission from 192.168.0.125 on port 25.
  3. Point its upstream delivery at your provider's submission endpoint, with the account credentials and TLS enabled.
  4. Change the project's SMTP setting from smtp.gmail.com to the relay's address, or to a hostname the panel's DNS resolves.
  5. Restrict the relay to the panel's address and require authentication from every other source; an unrestricted relay will be found and abused.

Test with the button, then leave it in service.

How do I test one stage at a time? #

Run five checks in order — event, addressing, gateway, name resolution, delivery — one button press each, and the first check that fails names the stage you repair; nothing before a passed check needs retesting.

  • Event: one press produces one send attempt; if not, fix the assignment and the recipient before the network.
  • Addressing: the panel holds 192.168.0.125, 255.255.255.0 and 192.168.0.1 with no conflict indication.
  • Gateway: the router's client list shows the panel at 192.168.0.125, or a monitored switch port shows traffic toward 192.168.0.1.
  • Name resolution: a query for the relay's hostname returns an address; repeated queries with no reply isolate DNS.
  • Delivery: the relay logs one accepted message and the mailbox receives one copy — check the mailbox's spam filtering separately from the SMTP acceptance.

If mail leaves the engineering environment but never the panel, that difference is its own fault class: why an HMI sends email in simulation but not from the panel covers the settings that differ between the two.

Can an alarm send the email instead of a button? #

Yes, once the button delivers: alarm classes expose separate events — incoming, acknowledged, cleared — and a mail function bound to each one sends its own message, so bind the send to the single event you want reported.

Add the alarm binding only after the manual test passes, then trip one alarm and verify exactly one message arrives, its timestamp checked against the alarm's occurrence. Binding incoming and acknowledged on the same class reports one fault twice; that may be exactly what a night shift needs, but make the choice deliberately.

Questions asked

Can the panel mail through our company mail server instead?

Often, and the test is the same: the server must accept a session from 192.168.0.125 using a method this runtime supports. Most corporate servers keep an internal receive path on port 25 for trusted hosts; ask the mail administrator to permit the panel's address on that connector and to confirm it does not force TLS internally. If it forces TLS, you are back to the Gmail problem.

Why did email to Gmail stop working when nothing on the panel changed?

Because the provider tightened its end: Google retired plain username-and-password sign-in for SMTP and accepts submission only over TLS on ports 465 and 587. An installation that mailed through smtp.gmail.com years ago was cut off by that policy change, not by a panel fault. The relay is the durable answer for strict providers.

What do the TIA Portal panels do differently for email?

Their runtime reads the mail setup from the panel's control panel: open the WinCC Runtime Advanced Internet dialog and fill in the E-mail tab with the SMTP server and account. Those runtimes still differ in which security methods they negotiate, so confirm TLS support in the device documentation before promising a direct Gmail connection; the relay pattern remains the reliable route.

How do I keep the new relay from becoming an open relay?

Accept unauthenticated submission only from 192.168.0.125 on the internal interface, require credentials from every other source, and never forward port 25 to it from the internet. Log what it accepts and review it once. A relay that accepts from anywhere is found quickly and used to send spam, and your provider will blacklist the connection.

Keep reading

  • How-to

    Showing a PLC Connection Fault on a Comfort Panel Alarm Display

    Enable the Comfort Panel's connection and disconnection system alarms, add an alarm buffer view, and drive a persistent HMI-local status tag from their events, because the system message shows for about 2 seconds and then leaves the screen while values freeze; a PLC clock heartbeat adds a stale-data check.

    HMI and touchscreens

  • Troubleshooting

    Why an HMI sends email in simulation but not from the panel

    Email that leaves from PC simulation but never from the physical panel means the project logic works and the panel's own send path is broken. Work the panel's chain in order: count and send condition, gateway, DNS and mail-server reachability, then the deployed project's email options, changing one option at a time. In the case behind this pattern, one checked option in the panel's email settings was the entire fault.

    HMI and touchscreens

  • Troubleshooting

    Why rebuilt HMI runtime files show #### for PLC tags

    Hashes on every tag after transferring a rebuilt WinCC Runtime Advanced project are a display symptom, not a communication code. Restore the working runtime files as a baseline, add an alarm view showing buffered System alarms, and branch on the message text: connection establishment, TLS certificates and clocks, hidden project pairing, or single-field formatting.

    HMI and touchscreens