Download sent emails from Yahoo, Gmail and Hotmail

I am making an Android application and I want to receive the last 25 emails sent from a specific email account.

For Gmail, I can use http://g4j.sourceforge.net/ , and for Yahoo there is an email web services API at http://developer.yahoo.com/mail/ .

But I could not find something with Hotmail.

Do you know if this is possible?

I am also worried that I have so many dependencies. I don't know if I should do something like https://sourceforge.net/projects/mrpostman/ and a web scraper .

+7
java android
source share
4 answers

You can download (or possibly download) emails in a variety of ways using different email providers. My experience with the following providers:

  • Yahoo:

    • POP3: available only for Plus users (paid service). No receiving new messages, no access to the folder, no sent mail; just enter all mailboxes (or all UID email addresses). UPDATE : Yahoo provides free POP access and forwarding for Yahoo Asia users.
    • Email Web Services API: enumeration of email headers for free users, but full access, including receiving mail from the sent folder, for Plus users (paid service again). Of course, you paid Yahoo a fee if you can encourage (forcibly) users to buy Plus, if you have not been sued before by Yahoo because the documentation for the web service says: "You cannot use the Yahoo! Mail Web Service API for displaying a Yahoo! user account information in a third-party mail client. "
    • Web Scraper: This is the only available solution for free Yahoo users, but keep in mind the compatibility issues that can occur when Yahoo changes its web pages. Also, make sure you delay access to links because Yahoo has a scratch detection mechanism on its servers.
  • GMail:

    • IMAPv4: available to all users. Be sure to use this protocol to access almost everyone in GMail. It is fully implemented; You can access all incoming and sent messages and even send an email by saving it in the sending folder. To do this, you can use JavaMail or any other Java IMAP client library, such as the Ristretto API. Be sure to review the limitations of JavaMail before using it for any protocol. It has many limitations (and minor errors) in all protocols (SMTP / POP3 / IMAP).
    • POP3: available for all GMail users, but not recommended due to the inherent limitations of POP3 (no folder, no new messages).
  • Hotmail:

    • POP3: Available to all users, but again, the limitations inherent in POP3 (no folder, no mail, no new messages) in addition to the Hotmail restriction, called the 15-minute delay required to access POP3.
    • Web Scraper: This is the only solution for accessing your mailing list, but again, you are aware of compatibility issues that can occur when Microsoft modifies Hotmail web pages and web clip detection software that may exist.
  • Common IMAPv4 Provider:

    • In general, not all IMAP providers support the submitted folder because it is not a standard IMAP folder, but most of them do. Take a look at the help system or frequently asked questions about this provider.
  • Genral POP3 Supplier:

    • Do not expect POP3 to do this, because POP3 does everything possible to prevent both the client and the server from crashing when extracting 2 new messages from mailboxes; -)

Meanwhile, do not forget that the web scraper has legal problems and is prohibited on most websites.

+9
source share

In our webapp company, we use JavaMail to send mail through a gmail account (very easy to use and powerful API). On the third-party JavaMail product page, I found the JDAVMail project. It provides an access method for WebDAV-based protocol services. It may be useful for you.

And for Android: javamail-android

+1
source share

Why don't you just use the built-in email tools or standard IMAP access methods? I assume that using a separate library for each provider will not work in practice.

0
source share

Google has an email application as an open source.

https://android.googlesource.com/platform/packages/apps/Email

Perhaps you yourself can use part of the source code.

-one
source share

All Articles