Is it possible to insert data from email into app database?

23 views
Skip to first unread message

Steve Husting

unread,
Oct 24, 2016, 11:31:08 AM10/24/16
to phonegap
I am making it possible for a user to export data from fields into email. Now I wonder if it is possible to email this to another device, copy it from the email, paste it into a field in an app, and in that manner insert it into that app's SQLite database or localStorage fields. Normally, one would enter each piece of data into a field and update the database that way. In my case, the data is in pairs -- field name: data. I ask this because I don't have the knowledge of how this could be done, but perhaps someone could say it could be done before I go further.

Steve Husting

unread,
Oct 24, 2016, 12:29:52 PM10/24/16
to phonegap
I think that the simplest way would be for them to simply copy the email contents and paste it into a field in the app to insert the entire text. It would be too difficult to parse each name:data pair to insert into DB.

Jim Brown

unread,
Oct 25, 2016, 11:03:25 AM10/25/16
to phonegap
You can configure a program to act as a handler for emails sent to a specific address on your app subdomain:


With this method, your program is invoked every time an email is received by the specified address and it can use MIME methods to retrieve the contents of the message, parse them and then do whatever you need to do with them (such as insert them into your database).

Jim Brown

unread,
Oct 26, 2016, 10:59:18 AM10/26/16
to phonegap
crap, wrong forum.  sorry.
Reply all
Reply to author
Forward
0 new messages