How to re-read email from Gmail?

Guys another question from me.
I have 2 account, Yahoo and Gmail. I access the 2 of them with a JavaMail application.
my question is:
1. Why Gmail's POP3 protocol can't retrieve my newest message, e.g the one with today's date. I've set it to download all message from the inbox, but from what i read, It download the latest messages only from the ones dated back to 2006. Here's my sample code:
Folder folder = reader.getFolder();
result = folder.getMessages();
//Read Through Email
System.out.println(result.length);
for(int i =result.length-1;i>=0;i--)
String subject = result.getSubject();
Date tgls = result[i].getSentDate();
System.out.println(subject+ " Send Date: " + tgls);
2. Why can't i Redownload an email from Gmail account? How to prevent it? is the FetchProfile class has anything to do with it? Yahoo can do it for sure without it. So i wonder, how to do it with Gmail (or others with the same POP3 behaviour)?
3. If i really need FetchProfile for Gmail, is Yahoo! (or other email provider) can use it too?
4. Can somebody explain to me what is the FetchProfile for?
Thanks in advance.
Edited by: hansip87 on May 12, 2008 8:55 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Yeah I've checked it, changed it to the first option - "     Enable POP for all mail (even mail that's already been downloaded)"
And still it can't re-download the downloaded once.
Well I've got my reason for this, it's because my program does something like this:
1. Fetch the message
2. Take all the message except attachment, insert it into a new class called LightMessage that represent a structure like Messages but without Folder or Session pointer in it.
3. We as user review it.
4. If desired, we'll call the receiver again to search with MessageNumberTerm that was taken from the first Pop3 fetch to take the attachment.
But that was resulting in error i've posted, saying that the message array is empty though the message is still in the inbox.
Should I just download all the Message info and then just take the attachment from the downloaded ones? Thanks in advance.

Similar Messages

  • Reading emails from gmail by labview

    I easily found a sample program to send an email to Gmail in LabVIEW and it works well. But I want to read emails from Gmail in LabVIEW as well. Is this possible? Thanks
    Jay
    Solved!
    Go to Solution.

    Well, not so much a duplicate post, since that post was asking about reading attachments. This is asking about getting emails from Gmail.
    To OP: Your question is not clear. Are you trying to download emails from your Gmail account? If so, you first need to configure Gmail to turn on the POP service. I don't think this is enabled by default. The Gmail help documents tell you how to do this. Once you've done that, you can just use a POP client. You can start by trying the one posted in this thread, but be aware, that sometimes servers have their own little "quirks", as alluded to in that thread.

  • How do I retrieve email from gmail

    I am new to apple and icloud, I would like to transfer my old email contents gmail, earthlink to my icloud... I can not figure out how to do it... if anyone can help with this, I would greatly appreciate, trying to eliminate some unneeded email addresses, but need the archived emails.

    Hi there,
    Sadly no - Your deleting so your removing it from the system.
    When ever you migrate away from BC or you are looking to have remove a site you need to ensure people back up their emails first.

  • How can I read email from my aol account from my iphone and keep it as uread on my computer at home.  It automatically goes to read mail on my computer.  On my computer if I want to keep an email to answer later I can mark it "Keep as New".

    How can I read my email from my aol account from my iphone and keep it as "unread" on my computer at home?  At home I can read an email and if I want to get back to it at a later date I can mark it as "keep as new".  I tend to forget it if it goes to "read" mail.   Right now, when I read an email from my phone it goes automatically to "read" mail.

    On the iPad, using the mail app, there is no way to do what you are asking without tapping the flag icon and marking the item as unread. Have you tried the OWA app for the iPad? It may have that functionality, but I haven't tested it as you need an Office 365 subscription with Exchange support to use the app.

  • How to Export 199 Emails from Gmail to File (PDF, DOC, ETC). And Possible to do Without Using Mail App?

    Greetings Everyone.
    I have 199 emails in gmail to be saved to a file. I do not use the Mail app on the iBook. I found a way to use a gmail gadget, but it would mean going into each and every email and saving as a document.
    Many thanks in advance.

    Check these thread links.
    https://discussions.apple.com/message/15967869#15967869
    https://discussions.apple.com/message/21758218#21758218

  • How do I send email from a gmail account

    How do I send email from a gmail account on my Macbook air?

    you have to setup your mail account in your macbook air

  • How do i get emails from my computer onto my iphone. i deleted my email ac and readded it and now i have no emails.

    how do i get emails from my computer onto my iphone. i deleted my email ac and readded it and now i have no emails.

    Set up the account correctly on the device.
    Contact whomever provides support for the account for specifics of setting up the account.

  • How to read emails from Microsoft Exchange Server

    I have microsoft exchange server and I want to read emails from microsoft exchange server. There is no POP3 server. So is it possible?
    If it is possible to read emails from microsoft exchange server then please give me some idea.
    Thanks
    Santanu

    santanu wrote:
    Hi,
    My company is using Microsoft exchange server.
    IMPA and POP3 has been disabled, but my requirement is I wan to read email.Then ask the administrator of the server to enable IMAP. If you have a valid business requirement to do that, there would be no reason for the administrator to refuse.

  • Permanently deleting emails from Gmail, while saving them in AppleMail

    I'm trying to figure out how to permanently delete emails from my Gmail All Mail folder without deleting them from the folders I moved them to in the On My Computer area of my AppleMail on my MacBook Pro.  I like the IMAP syncing function in Gmail that keeps my iphone, ipad and MacBook all synced from an email perspective.  However, I don't like my emails living on Gmail's servers any longer than they have to.  I don't want them living on Apple's servers either, so I'm not using iCloud. 
    I only want emails to remain on the Gmail servers for as long as I keep them in either my inbox or sent items.  I use those two folders as my holding zones for items that still require action.  Once I have done what needs to be done in regard to an email, I either delete it or I move it to a folder under On My Computer on my MacBook Pro for possible later reference.  If I move an email to a folder, I never want it to be deleted.  I use a Time Capsule to back up my Macbook through Time Machine, so I'm not worried about losing my historical email files from a hard drive problem.  I also back up the MacBook quarterly to a separate hard drive which I store offsite in case a catastrophe at my home destroys both my MacBook and the Time Capsule.
    I have about 8 years of email history that I imported from my old PC into the MacBook in AppleMail and I now want to clean out the All Mail account in my Gmail to delete all those emails, but I need them to remain in my folder system on the MacBook.
    Can anyone tell me how to delete all mail from the Gmail account without having the IMAP function delete them from my MacBook Pro?
    Here's an added complication.  When I move an email from my inbox to a folder on my MacBook, I do want that email to disappear from my ipad and my iphone. In essence, I like to manage all my emails from my MacBook Pro if they need to be saved into folders, but I also like to be able to delete emails that don't need to be saved from any of my devices and have that deletion sync to all my devices.
    I haven't been able to figure this one out.  Any help is appreciated.

    Make local folders (On My Mac) and move the mails there, they will delete from the GMail servers but remain accessible in Mail, only in Mail.
    All Mail (in Gmail) is not a folder, it is a label for all your mail, anything in there is also in one of GMails folders, when you delete from All Mail you are deleting the original mail.

  • How do I keep emails from being deleted on my iPhone 6? Emails get deleted from phone when I startup desktop computer and they are downloaded from sever. Is POP3 no longer supported on IOS 8.1?

    How do I keep emails from being deleted on my iPhone 6? Emails get deleted from phone when I startup desktop computer and they are downloaded from sever. Is POP3 no longer supported on IOS 8.1?

    Have you seen this?
    Using a POP account with more than one device - Apple Support
    A better solution is if your email provider uses IMAP. IMAP sync email folders between multiple devices. Meaning any device will receive the email, all sent email can be seen on the devices. If you delete email from one device the email is deleted from all the other devices. Check with your email provider to see if they offer IMAP services.
    If they do not your choices are to 1) configure email on the PC to keep Mail on the mail server or 2) change email providers to something like Gmail or Outlook.com (as examples). FWIW I use Cox IMAP email and fully sync email between a Win 8.1 Update 1 laptop, a Win 7 desktop, an iPad 4, an iPhone 4 and an iPhone 5S.

  • How do I export emails from iPad 'Mail' box to iCloud?

    How do I export emails from iPad 'Mail' box to iCloud?

    but what about the emails that are in folders on icloud.. do I have to manually forward them.. or is there a setting..
    orr how can I import them through gmail..

  • How do I export emails from icloud

    How do I export emails from icloud

    but what about the emails that are in folders on icloud.. do I have to manually forward them.. or is there a setting..
    orr how can I import them through gmail..

  • How can I send email from my yahoo alias account in iPhone5 mail?

    How can I send email from my yahoo alias account in iPhone5 mail?
    I have 2 email accounts: [email protected] is an alias of [email protected]
    In my old iPhone3 I had these accounts set up so that I could send and receive email from both accounts. I did this using the following settings:
    ‘Other’ POP account info:
    Name: xyz
    Address: [email protected]
    Description: alias
    Incoming mail server:
    Host name: pop.mail.yahoo.com
    User name: [email protected]
    Password: password for yahoo account
    Server port: 995
    Outgoing mail server:
    SMTP: smtp.o2.co.uk (o2 is the name of my phone network)
    Server port: 25
    ‘Yahoo!’ account info:
    Name: xyz
    Address: [email protected]
    Password: password for yahoo account
    Description: Yahoo!
    Outgoing mail server:
    Primary server: Yahoo! SMTP server
    Server port: 465
    I’ve tried using the same settings in my new iPhone5, but it doesn’t work. I can receive mail to both accounts, and can send from the Yahoo account, but I cannot send mail from the alias account. When I try, it displays the message: “Cannot send mail. A copy has been placed in your Outbox. The recipient ‘[email protected]’ was rejected by the server”.
    I’ve tried to configure the POP alias account using combinations of ‘pop.mail.yahoo.com’, ‘pop.mail.yahoo.co.uk’, ‘apple.pop.mail.yahoo.co.uk’ and ‘apple.pop.mail.yahoo.com’, for the incoming host, and ‘smtp.o2.co.uk’, ‘smtp.mail.yahoo.com’, ‘smtp.mail.yahoo.co.uk’, ‘apple.smtp.mail.yahoo.com’ and ‘apple.smtp.mail.yahoo.co.uk’ for the outgoing mail server. None of these have worked.
    I’ve also tried setting it up using IMAP instead of POP without success. I tried configuring it using combinations of ‘imap.mail.yahoo.com’, ‘apple.imap.mail.yahoo.com’, ‘imap.mail.yahoo.co.uk’ and ‘apple.imap.mail.yahoo.co.uk’ for the incoming mail server and ‘smtp.o2.co.uk’, ‘smtp.mail.yahoo.com’, ‘smtp.mail.yahoo.co.uk’, ‘apple.smtp.mail.yahoo.com’ and ‘apple.smtp.mail.yahoo.co.uk’ for the outgoing mail server.
    Yahoo say that if I can't send Yahoo! Mail from my mail program, I may be accessing the Internet through an ISP that is blocking the SMTP port, and that if this is the case, I should try setting the SMTP port number to 587 when sending email via Yahoo!'s SMTP server. I don't think that this is the problem, but I tried it just to make sure - without success.
    I’ve also heard that the problem might have something to do with the SPF settings of my alias domain provider. I’m not too sure exactly what SPF settings are, or how to change them, but from what I can gather it seems unlikely that this is the problem given that I was able to send mail from my alias account on my old iPhone3.
    Any help much appreciated: how can I get my alias account to send emails in iPhone5 mail?
    Many thanks,
    Patrick

    A new development: I've tried sending emails from the alias several times over the past 24 hours, but in general I've deleted them if they haven't sent within about half an hour.
    However, one of the messages I left sitting in the outbox did send successfully in the end, but this took about an hour.
    So: perhaps my problem is not in fact that I am completely unable to send mail from my alias, but that I can only do so intermittently and extremely slowly, and by ignoring the "cannot send" message.
    Any help appreciated.

  • After upgrading to Yosemite, I don't receive email from Gmail users

    Using a MacBook Pro, 2.8 GHz Intel Core 2 Duo, 8 GB RAM, 1 TB SSD internal hard drive.  OSX v10.10.2
    My primary email address is an .mac/.me/.icloud email address.
    Recently upgraded to Yosemite.  After doing so, I am having trouble receiving emails from Gmail users (I am not having trouble sending emails from my Gmail account, as many people have).
    I asked 8 of my friends with Gmail email addresses to email me a test.  I received 4 of these emails immediately after they were sent, the other 4 email took anywhere from 4 to 48 hours for me to receive.
    Anyone else have this problem, and if so, any solutions?  Any help is greatly appreciated.

    There have been various posts about delayed Gmail e-mail delivery to iCloud e-mail addresses, but so far, no solutions. Gmail uses a nonstandard form of IMAP e-mails, which may be causing the problem.

  • How can I send email from my HPEPrint email address

    How can I send email from my HPEPrint email address, to other addresses? Is the HP photosmart 5010 smtp compatible?

    Hello
    The eprint service is only used for incoming emails to the eprint center which then go to your printer, you cannot send out emails from that address.
    Jon-W
    I work on behalf of HP
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    Click the KUDOS STAR on the left to say “Thanks” for helping!

Maybe you are looking for