Incoming Emails

LittleBritaly

Member
Licensed User
Longtime User
I have my own domains and push email server, I want my b4a app to listen for incoming emails and send certain ones to a php script.

I have this working for incoming text messages (using SmsInterceptor), I would now like to do the same with push email.

I've seen the docs for SMTP but this just appears to be for sending emails (got this part working with my own server), how do I *listen* for incoming emails ?, is this possible with b4a at the moment ?.
 

LittleBritaly

Member
Licensed User
Longtime User
Thanks, had a look at pop3 but that would mean having to poll my server every x-seconds which would eat battery life (or so I believe) .

I use K9 as my mail client, use IMAP to connect to my Zarafa (a exchange alternative that runs on Linux) server, this pushes emails to K9 when one arrives.

This is what I'm trying to achieve (the push part) , maybe it's not possible yet with B4A ?.
 
Upvote 0

wl

Well-Known Member
Licensed User
Longtime User
POP3 only allows for polling. An alternative for POP3 is IMAP. some IMAP servers (eg: the one of Google) support the IDLE command which allows for email pushing. The K-9 Android app supports IMAP IDLE (on the Android = client side).
As of current, there does not seem to be an IMAP library for B4A ...

You could also use the C2DM platform to push messages to your Android phone. So you think of some combination: your email server sending a C2DM message to your device, which picks this up and retrieves the full mail message.
 
Upvote 0

LittleBritaly

Member
Licensed User
Longtime User
Thanks for the info, I don't want to rely on google or anyone else, there's always a chance their terms will change, or the service could be withdrawn.

I've decided to handle this another way (my android app is going to talk directly with an epos system and the email part can be handled from there).

I'm having problems getting them to talk to each other over the network, but will post a new question if I can't figure it out.

Thanks for your input, much appreciated.
 
Upvote 0
Top