Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: How to receive emails on iOS and Android ?



Permlink Replies: 6 - Last Post: Apr 5, 2018 4:53 PM Last Post By: Dave Nottage
John Birch

Posts: 135
Registered: 8/23/02
How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 2, 2018 2:21 PM
I found many examples on the net to send emails using indy components but I did not find any information how I can receive emails ? I am open if there are other components allow me to send and receive emails on both iOS and Android.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 2, 2018 3:09 PM   in response to: John Birch in response to: John Birch
John Birch wrote:

I found many examples on the net to send emails using indy components
but I did not find any information how I can receive emails ?

Indy has TIdPOP3 and TIdIMAP4 components for retrieving emails.

--
Remy Lebeau (TeamB)
John Birch

Posts: 135
Registered: 8/23/02
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 2, 2018 3:25 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks Remy

Any examples ? as I never did that before.
John Birch

Posts: 135
Registered: 8/23/02
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 3, 2018 12:52 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
also is it possible to receive a push notifications for new emails ?
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 3, 2018 1:29 PM   in response to: John Birch in response to: John Birch
John Birch wrote:

also is it possible to receive a push notifications for new emails ?

Push notifications are sent externally from the device. Perhaps you mean that you want the app to send a local
notification when new messages are available? If you want this to happen when the app is not running, it's going to be
problematic on iOS. On Android, you'd need to use a service.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
John Birch

Posts: 135
Registered: 8/23/02
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 5, 2018 3:18 PM   in response to: Dave Nottage in response to: Dave Nottage
Thanks Dave

why it would be a problem in iOS ?
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How to receive emails on iOS and Android ?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 5, 2018 4:53 PM   in response to: John Birch in response to: John Birch
John Birch wrote:

why it would be a problem in iOS ?

Because running code while the app is in the background, or if the app is terminated requires special handling that is
not trivial to implement (as opposed to Android).

For apps that have been terminated, the only scenarios available (that I'm aware of) are for location updates, which
requires the device to be in motion, and background fetch, which might be called within hours, or it might be called
within minutes). For the latter, refer to this article:

http://delphiworlds.com/2016/06/performing-background-fetches-ios/

For apps that are running in the background i.e. the user (or the system) has not terminated it, they need to provide a
particular service, as per this older, but still relevant, article:

http://delphiworlds.com/2013/10/providing-background-services-support-to-your-ios-apps-with-delphi/

On Android, it's a more trivial case of using a service, though there's been a number of restrictions introduced in
later versions that need to be taken into account.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02