News:

  • September 23, 2026, 02:03:22 PM

Login with username, password and session length

Author Topic: EMAIL to text message not working  (Read 28671 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
EMAIL to text message not working
« on: February 16, 2019, 12:14:48 PM »
I have been using the EMAIL instruction successfully for quite some time.  I am now trying to send a message via 5551234567@vtext.com.  However, it's not working for me.  In the System Info > System Status Tab I see MSG toggling:
Connecting to SMTP Server
MAIL FROM: <email@gmail.com>
RCPT TO: <5551234567@vtext.com>
HELO [192.168.IP.address]
SMTP Connected!

The ERR reads: Unexpected response from SMTP server in EMAIL @000028A8 (EMAIL at AlarmEmailPrgrm@1557)

I can send the same message to an email address, and I can forward that successfully to the vtext.com address.  The total message is 128 characters

What am I doing wrong here?
« Last Edit: February 16, 2019, 12:43:53 PM by Bolt »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #1 on: February 16, 2019, 02:05:10 PM »
Probably nothing. I'm guessing the email provider has changed some stuff that is causing the controller some issues. It may require a minor firmware tweak.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #2 on: February 16, 2019, 03:39:56 PM »
I see.  In V2.4?

On a similar note, how do I get my emails sent via the BRX to not be received as spam with the attached warning?  Probably something about SPF or DKIM but how do I go about setting that up in this application?


BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #3 on: February 18, 2019, 09:37:59 AM »
I sent a vtext via GMail and had no problem. I used TLS and AUTH LOGIC.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #4 on: February 19, 2019, 06:24:59 PM »
Okay, didn't have any of those settings enabled, I was still running the old setup from 2.1.

Now I have all those features (TLS, AUTH LOGIN) enabled in the device setup, and hitting "Test settings and verify server credentials" results in "Your settings are good", but upon using the EMAIL instruction (even to a regular email address) results in "Couldn't open TCP connection with specified device in EMAIL at ....."

Any more ideas?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #5 on: February 19, 2019, 06:41:31 PM »
Okay, didn't have any of those settings enabled, I was still running the old setup from 2.1.

Now I have all those features (TLS, AUTH LOGIN) enabled in the device setup, and hitting "Test settings and verify server credentials" results in "Your settings are good", but upon using the EMAIL instruction (even to a regular email address) results in "Couldn't open TCP connection with specified device in EMAIL at ....."

Any more ideas?

Make sure DNS and gateway are set correctly. Other than that, not sure. Lots of networking possibilities.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #6 on: February 19, 2019, 07:56:10 PM »
Hmmm, not much luck.  The PLC can do a DNS lookup via ladder logic.  All my local network TCP connections still work fine.  I also create an app password for the gmail account, and successfully implemented it on all my other devices using this account.

I went back to the old settings I had, just using an IP address, port 25, no SSL and no account authentication and it "works" like before, to another gmail address.

I have it setup basically the same as in https://www.youtube.com/watch?v=olaJdWGCX6o.  Does anyone else care to post a screenshot of their known working SMTP Client Settings?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #7 on: February 20, 2019, 01:34:29 AM »
i don't think @gmail.com should be part of the user name.
« Last Edit: February 20, 2019, 10:02:05 AM by BobO »
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #8 on: February 20, 2019, 10:03:59 AM »
Additionally, set $EnableMsgDump (ST36) and run DMLogger. This will allow you to capture more info from the interaction with the email server.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #9 on: February 20, 2019, 12:53:39 PM »
This works for me...

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #10 on: February 20, 2019, 06:54:40 PM »
Thanks.  The @gmail.com seems to be the only real difference between our settings.  Both Gmail tutorials and the YouTube video show it in there, but that's easy enough to test.  Currently just having a hard time to get enough system downtime to do the program updates.  It's unfortunate that changing a username/password for a device requires a plant shutdown.  I understand, but annoying non the less.

Thanks for the heads up on $EnableMessageDump.  Just what I was looking for.  Already found a (minor) error with and STRSUB instruction I had not been able to troubleshoot.  If only all my issues were that easy to fix!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #11 on: February 20, 2019, 07:32:04 PM »
You don't have to shut it down. DEVWRITE gives you access to device properties at runtime.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #12 on: February 21, 2019, 11:42:56 AM »
Cool.  Does it give access to Enable/Disable SSL/TLS?  Right now I have that turned off again when I reverted all my settings to a known working setup.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: EMAIL to text message not working
« Reply #13 on: February 21, 2019, 01:27:22 PM »
Cool.  Does it give access to Enable/Disable SSL/TLS?  Right now I have that turned off again when I reverted all my settings to a known working setup.

No. That one is harder due to the certificates needing to be read and stored in the config. I guess it would be possible to downgrade from a full SSL config, but we ddidn't make it possible to change that because there were ways it could cause issues. User names and passwords and such can be though.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: EMAIL to text message not working
« Reply #14 on: February 21, 2019, 05:44:42 PM »
With user@gmail.com or user as username, I get the following log file dump.
Code: [Select]
192.168.0.91  Port 29298(0x7272),02/21/19 16:41:17.858 ,"Couldn't open TCP connection with specified device in EMAIL @0000023E"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:17.856 ,"SMTP disconnected!"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:17.855 ,"Server connection lost. Shutting down..."

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.871 ,"Starting TLS handshake..."

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.870 ,"220 2.0.0 Ready to start TLS"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.802 ,"STARTTLS.."

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.801 ,"250 SMTPUTF8"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.801 ,"250-CHUNKING"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.800 ,"250-PIPELINING"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.799 ,"250-ENHANCEDSTATUSCODES"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.726 ,"250-STARTTLS"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.725 ,"250-8BITMIME"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.724 ,"250-SIZE 35882577"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.723 ,"250-smtp.gmail.com at your service, [12.345.678.901]"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.722 ,"EHLO [192.168.0.91].."

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.722 ,"220 smtp.gmail.com ESMTP e9sm98844pfb.52 - gsmtp"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.636 ,"SMTP connected!"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.565 ,"Connecting to SMTP server..."

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.564 ,"DNS lookup complete"

192.168.0.91  Port 29298(0x7272),02/21/19 16:41:07.563 ,"Beginning DNS lookup..."
« Last Edit: February 21, 2019, 06:14:37 PM by Bolt »