Receiving POP email


Recommended Posts

I want to check an email account for emailed production reports, then enter the data in a database.    The email account that would be convenient for this is a typical ISP account requiring SSL, which I don't believe DAQ Factory supports.     The emails are available through a web page as well, and I've been playing with HTTP.Get() to try to read the emails from there, but it doesn't seem that there's a URL API to log in, you have to do it via either saved password in the browser (I use Vivaldi), or type it into fields in the login page, neither of which I think will apply to DAQ Factory.

I did manage to get a return from the server but it contained text complaining that I needed a browser that supports Javascript.

Is there some simple known way to get email from a POP server that uses SSL but also has a webmail page?

 

Link to comment
Share on other sites

You probably aren't going to be able to get it through a web page.  Pretty much all web pages authenticate with POST or in headers.  DAQFactory doesn't support POST, but does support adding additional headers, but it would still be quite a task to try and parse the resulting HTML.  You'll also need to add some headers to tell the server that you do support javascript (even though you don't).  I can't give you much input on what header is required but I am sure a web search will tell you quick.

On the DAQFactory side, it looks like internally we used a library that does, in fact, support SSL but we didn't bring it out because we didn't think anyone used the POP3 feature.  This is certainly proven by the fact that you are the first to request or even comment on this feature ever.  Everyone uses the SMTP side to send alerts, etc, but retrieving info from a POP3 server is much less useful because of the security issues.  You certainly wouldn't want to control something through email. 

Anyhow, we can look to enabling this.  It would not take long.  But you would likely need to run on the newest build, which is ready for beta.  

Link to comment
Share on other sites

Oh, and thinking about it, one workaround would be to simply forward the email from your existing secure account to some other email server / address that has lower security requirements. 

Another workaround would be to use a shell POP3 tool to retrieve your messages to a file then ingest it using File. functions.  I often use files as an intermediary for getting data from difficult sources into DAQFactory.  For example, I needed to link a DLL that was only available as 64 bit.  Since DAQFactory is 32 bit, there is no way for it to utilize this library.  I could have, I suppose, created a socket and went that way, but it was just easier to use a file to pass data back and forth (two files really).  Since this was running on flash drives, I used a RAM disk to avoid wearing since the files were being updated like 30-50x's per second and just temporary.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.