News:

  • April 20, 2024, 07:29:28 AM

Login with username, password and session length

Author Topic: Do-More & Email  (Read 4189 times)

Garyhlucas

  • Hero Member
  • *****
  • Posts: 400
Do-More & Email
« on: May 23, 2015, 12:14:03 PM »
I am using a Do-More PLC with C-More HMI connected to the Internet through a cell modem.  The HMI handles alarm messages by sending text messages to the operators which has worked well.  We are also using the C-More app on cell phones which also works very well. However I understand that the Do-More can send email.  We'd like to send short status reports of flow totals and such on a monthly basis to the operations companies via email.  Does this sound workable?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5984
  • Yes Pinky, Do-more will control the world!
Re: Do-More & Email
« Reply #1 on: May 23, 2015, 02:39:29 PM »
Totally.
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3561
  • Darth Ladder
Re: Do-More & Email
« Reply #2 on: May 23, 2015, 07:50:20 PM »
Well, it might be SLIGHTLY harder than falling out of a tree, but it's quite doable.

One issue I've found while doing this is a de facto incompatibility between Do-More's current email implementation and certain email servers.  While Do-More supports four login methods (Disabled, AUTH PLAIN, AUTH LOGIN, and POP before SMTP), it only allows for a single server IP address.  If your email provider has different IP addresses for POP and SMTP servers, and uses POP before SMTP login, I don't think Do-More can be made to work with them.  (Very many of the providers I checked have different POP and SMTP IP addresses but I don't know how common it is to require POP before SMTP.  This issue only exists when both those things occur together)  I believe Host has said that at some point, they may add the capacity for different POP and SMTP IP addresses.

I have identified two (free) email providers that work with AUTH LOGIN, VFEmail.net and Inbox.com.  I have screenshots of the email server setup and details on how to set up your Do-More SMTP device for those two providers.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Do-More & Email
« Reply #3 on: May 23, 2015, 09:40:47 PM »
it only allows for a single server IP address.
That was addressed in 1.3.  You can use DEVWRITE to modify the following SMTP Server device parameters programmatically at runtime:

  • SMTP Server IP Address
  • SMTP Port
  • POP3 Port
  • Authentication Account User Name
  • Authentication Account Password
  • Authentication Mode (i.e. "login methods")
  • "From" EMail Address


franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Do-More & Email
« Reply #4 on: May 23, 2015, 09:43:14 PM »
And probably critical to the setting of the IP Address of the SMTP Server is the DNSLOOKUP instruction also added in 1.3 for those mail servers that "move around" for security purposes.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3561
  • Darth Ladder
Re: Do-More & Email
« Reply #5 on: May 23, 2015, 10:27:32 PM »
That was addressed in 1.3.  You can use DEVWRITE to modify the following SMTP Server device parameters programmatically at runtime

I'm not following.  How does DEVWRITE help in the POP-before-SMPT logon where both the (potentially different) POP and SMTP IP's are needed during the same transaction?

It's not like I can do half the authentication, then DEVWRITE the other IP address, then complete the EMAIL box execution.  Or am I not following what you're suggesting?

As I see it, DEVWRITE helps when the customer wants to change the email sender account 6 months after you ship the system.  What I'm talking about here is separate POP and SMTP IP addresses in a single configuration, rather than a change in configuration over time.
« Last Edit: May 23, 2015, 10:36:08 PM by Controls Guy »
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Re: Do-More & Email
« Reply #6 on: May 23, 2015, 11:17:18 PM »
I'm not following.  How does DEVWRITE help in the POP-before-SMPT logon where both the (potentially different) POP and SMTP IP's are needed during the same transaction?
Now I see.  Agreed.

1.3 addressed the issue of dynamic SMTP server IP addresses, not different POP3 vs SMTP addresses.  My bad.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5984
  • Yes Pinky, Do-more will control the world!
Re: Do-More & Email
« Reply #7 on: May 24, 2015, 02:21:46 PM »
As I see it, DEVWRITE helps when the customer wants to change the email sender account 6 months after you ship the system.  What I'm talking about here is separate POP and SMTP IP addresses in a single configuration, rather than a change in configuration over time.

In part. The bigger issue is services like Google that rotate the IP addresses every few seconds. Address must be read, set, and used immediately.



OK...I've given you a solution. Because it would require versioning the config and presenting a pile of compatibility issues to solve with previous firmware, I have not given you a way to configure both an SMTP and POP3 address from the SysConfig...but...have made the POP3 address accessible from DEVWRITE. The way it will work is that until the POP3 address has been set, it will use the SMTP address (either from SysConfig or DEVWRITE, as last set), but after you set the POP3 address, the two are no longer joined and will use the last value specified for each (until the next power cycle or SysConfig download).

That's the best I have at the moment. Not perfect, but will solve your issue.
« Last Edit: May 24, 2015, 02:38:01 PM 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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3561
  • Darth Ladder
Re: Do-More & Email
« Reply #8 on: May 24, 2015, 05:11:25 PM »
In part. The bigger issue is services like Google that rotate the IP addresses every few seconds. Address must be read, set, and used immediately.

Yeah, you definitely don't want to rewrite to the config in that scenario.

Quote
OK...I've given you a solution. Because it would require versioning the config and presenting a pile of compatibility issues to solve with previous firmware, I have not given you a way to configure both an SMTP and POP3 address from the SysConfig...but...have made the POP3 address accessible from DEVWRITE. The way it will work is that until the POP3 address has been set, it will use the SMTP address (either from SysConfig or DEVWRITE, as last set), but after you set the POP3 address, the two are no longer joined and will use the last value specified for each (until the next power cycle or SysConfig download).

Is this post-1.3?  In the version that I'm running, the only POP-related address element that I can DEVWRITE is the port, as far as I can see.  In any case, thanks for your attention to the matter!  I was resolved to just find and catalog email providers that didn't present this scenario, but I like your solution better.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5984
  • Yes Pinky, Do-more will control the world!
Re: Do-More & Email
« Reply #9 on: May 24, 2015, 05:11:34 PM »
Is this post-1.3?  In the version that I'm running, the only POP-related address element that I can DEVWRITE is the port, as far as I can see.  In any case, thanks for your attention to the matter!

Added today. Will be in 1.4.
"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

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3561
  • Darth Ladder
Re: Do-More & Email
« Reply #10 on: May 24, 2015, 06:09:59 PM »
Added today. Will be in 1.4.

Thanks!  That will open up a lot of new email providers for use with Do-More (including cases where customers want to use their own, but it's one that's been incompatible till now).
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.