Receive emails via livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Receive emails via livecode
So Ive searched google, the forum and the IOS release notes.
My question is is there a way to monitor e-mails or text messages that are incoming and if it is from a specific user open the email or text and mine some data from it? I see the ability to compose and send text and emails but not receive them in this fashion. Perhaps this is just asking to much?
Dave
My question is is there a way to monitor e-mails or text messages that are incoming and if it is from a specific user open the email or text and mine some data from it? I see the ability to compose and send text and emails but not receive them in this fashion. Perhaps this is just asking to much?
Dave
Re: Receive emails via livecode
You need a POP3 library to access emails on the server.. I would recommend one that can do the TOP command so you just grab the headers to look for the messages you want to retrieve completely from the server.. The POP3 part is easy, decoding of the email messages is the pain (good old MIME)..
Re: Receive emails via livecode
I'd like to pursue this further.
I'm looking thru the TROZ libraries now.
Has anyone got a hyperlink for further research?
Wow!
Upon further research into this library,
looks like everything I'm looking for is already there.
Release in 2010 and seems like no further updates were necessary.
Very cool
I'm looking thru the TROZ libraries now.
Has anyone got a hyperlink for further research?
Wow!
Upon further research into this library,
looks like everything I'm looking for is already there.
Release in 2010 and seems like no further updates were necessary.
Very cool
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Receive emails via livecode
Just sharing ...
Added a get DateAndTime routine - this worked for two difference email servers
and fixed the Clear script to include enabling Read emails button
Error: Sorry, the board attachment quota has been reached.
At the moment it seems that out of 19 emails only 12 are getting saved to text files.
I'm sure they are 7 duplicates.
Not sure if we care.
I'll probably change the file name to reflect the DateAndTime received.
Added a get DateAndTime routine - this worked for two difference email servers
and fixed the Clear script to include enabling Read emails button
Error: Sorry, the board attachment quota has been reached.
At the moment it seems that out of 19 emails only 12 are getting saved to text files.
I'm sure they are 7 duplicates.
Not sure if we care.
I'll probably change the file name to reflect the DateAndTime received.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Receive emails via livecode
Is there a way to uniquely identify emails from the headers?
I thought Date Time From Subject.
Is there a UID somewhere in the email headers?
Found it.
Message-ID: 20050329231145.62086.mail@mail.emailprovider.com
A unique number assigned by mail.emailprovider.com to identify the message.
Its where I'm getting the Date Time
yyyymmddhhmmss.etc
I thought Date Time From Subject.
Is there a UID somewhere in the email headers?
Found it.
Message-ID: 20050329231145.62086.mail@mail.emailprovider.com
A unique number assigned by mail.emailprovider.com to identify the message.
Its where I'm getting the Date Time
yyyymmddhhmmss.etc
Last edited by LC4iOS on Fri Dec 20, 2013 10:16 pm, edited 1 time in total.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Receive emails via livecode
Careful with the date extraction there - the message ID is not a standard format, afaik, it is just a string that identifies individual messages and I believe the sender's service can generate whatever string it chooses by its own rules. Messages from sources other than your test may not have the same ID generator.
That example header - did you get that from a real message? Was it really sent in 2005?
That example header - did you get that from a real message? Was it really sent in 2005?
Re: Receive emails via livecode
Thanks SparkOut.
I was sure to mention it worked on my two providers so far.
l'll sort the date time stamp out when the situation arrises.
I do see another verbose date with GMT offset.
I'll have to see if there is an example of coverting it to sql date n time here on livecode forums.
That example header is just an example.
Still can't upload my projects.
I was sure to mention it worked on my two providers so far.
l'll sort the date time stamp out when the situation arrises.
I do see another verbose date with GMT offset.
I'll have to see if there is an example of coverting it to sql date n time here on livecode forums.
That example header is just an example.
Still can't upload my projects.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Receive emails via livecode
LiveCode makes everything look easy.
But user contribution make LiveCode ROCK!
But user contribution make LiveCode ROCK!
Code: Select all
convert "Sat, 21 Dec 2013 12:54:29 +1100" from internet date to short date and short time
answer it
convert "Sat, 21 Dec 2013 12:54:29 +1100" from internet date to dateItems
answer it
answer the internet date
convert the internet date from internet date to dateItems
answer it
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Receive emails via livecode
Some of the email subjects are returning strange content:
=?windows-1252?Q?Academics_Save_50%_on_Valentina_Studio_Pro?=
Its easy enough to clean up but I was just wondering what this encoding is?
All messages are mime type v1.
Even the ones without this strange content.
=?windows-1252?Q?Academics_Save_50%_on_Valentina_Studio_Pro?=
Its easy enough to clean up but I was just wondering what this encoding is?
All messages are mime type v1.
Even the ones without this strange content.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Receive emails via livecode
Just another example of Microsoft not adopting common standards - apparently they felt ISO 8859-1 wasn't good enough for them:
http://en.wikipedia.org/wiki/Windows-1252
http://en.wikipedia.org/wiki/Windows-1252
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn