Check Mail program failed

Hi all, I have a litle problem with a function in a check mail program, that is a NoSuchProviderException, the code is:
public void checkMail(){
try{
Properties props = new Properties();
Session session = Session.getDefaultInstance(props, null);
Store store = session.getStore("pop3");
store.connect("myhost", "myusername", "mypassword");
Folder folder = store.getFolder("inbox");
folder.open(Folder.READ_ONLY);
Message message[] = folder.getMessages();
for (int i=0;i<message.length;i++){
System.out.println(i + ": " + message.getFrom()[0] + "\t" + message[i].getSubject());
System.out.println(message[i].getContent());
folder.close(false);
store.close();
}catch(NoSuchProviderException e){
System.out.println("problems : " + e.getMessage());
}catch(MessagingException e){
System.out.println("problems2");
}catch(IOException e){
System.out.println("problems3");
the message is:"No provider for pop3"
, I have tried to put POP3 and others combinations, only one works, it's imap, but fail in the next step, because of the machine does not support the imap protocol. Also I have pop3.jar in classpath, I have no idea what is the problem.
thanks

You must have com.sun.mail.pop3.* package in your classpath and it seems like you don't

Similar Messages

  • Why has My mail program failed?

    I am having problems with my 27" Mac (about 3 years old). It seems to caused by the Mail program and does not occur if Mail is not loaded in. Basically the computer slows down and sometimes locks up, If Mail is not loaded, I can use other programs and surf the internet as normal.
    I know that others have similar problems but do not understand Apple's silence on this matter. I would like to know if there is any fix that I can do for this problem and when will Apple make the necessary fix.?

    Back up all data, then triple-click anywhere in the line of text below on this page to select it:
    /var/db/crls
    Copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens (command-V). You won't see what you pasted because a line break is included. Press return.
    From the folder that opens, move these two files to the Trash:
    crlcache.db
    ocspcache.db
    You’ll be prompted for your administrator password. Reboot, empty the Trash, and test.

  • Mail program not working since upgrading to Leopard 10.5.6

    We have loaded the new Leopard system now twice, and both times the Mail program fails to launch from the taskbar, but stays open in the background. The program will not close, and fails to open to even try to check email. It seems other programs are working just fine, but nothing right with Mail. Anyone know if there is a fix to this?
    Thanks,
    lldowney

    Hello, and welcome to the Discussions.
    While the other poster's cited article references certain issues with 10.5.6, they are when updating a system that was already on Leopard. If, as it appears, you were Upgrading an earlier version of OSX, such as 10.4.11, then the relevant article is:
    http://support.apple.com/kb/TS2537
    Where an even earlier OSX than Tiger once generated the Mail folder, two other MessageSorting files will need to be removed, also.
    Ernie

  • Hotmail PW updated, Can't use Mac book Mail program to check mail

    Hi,
    I updated my hotmail.com user password .  I can log in on a hotmail web browser to check mail.
    But if I check mail on the Mail Program on my Mac Pro,  the Mail program keep showing me
    "Mail can't connect to the account Hotmail.com".
    Please help.

    Thank you LexSchellings for your reply.
    I did the following procedure:
    * disabled the existing hotmail.com account,
    * add a new hotmail.com account with the same info.
    This solved my problem.
    I found the non working hotmail.com account with incoming and outgoing servers are "live.com :-
    For hotmail.com account , they should be:
    Incoming mail "imap-mail.outlook.com",
    Outgoing mail "smtp-mail.outlook.com"

  • I have to verify my iCloud email but every time I choose 'check mail' it says Connection to server failed cannot check mail. I have a iPhone 5c

    I have to verify my iCloud email but every time I choose 'check mail' it says Connection to server failed cannot check mail. I have a iPhone 5c

    Hi Calinalina,
    Thanks for visiting Apple Support Communities.
    You can use the steps in this article to troubleshoot iCloud mail on your iPhone:
    iCloud: Troubleshooting iCloud Mail
    http://support.apple.com/kb/ts4002
    All the best,
    Jeremy

  • Mail program : checking multiple accounts?

    Other than forwarding accounts on the web server, is there a way to ask the Mail program to check multiple accounts? I thought I had it setup correctly by setting the preferences as the following (but it does not work).
    Under "accounts" I've set up all email address address domains that I want to have arrive in my inbox, and I separated each individual address with a comma, followed by a space.
    Thanks,
    Glen
    g4 titanium laptop   Mac OS X (10.4.6)  

    Couldn't really tell from your post, but, do you have
    multiple accounts setup for each of your email
    address' with specific incoming mail servers and l/p
    for all or did you setup one account in hopes all
    addresses would be synced?
    jahaun
    They all are variations of the same domain name... eg. studio@..., glen@..., other employees@...
    So they exist at the same domain web server with one I.P address.
    Thanks,
    Glen

  • How do I add a Gmail account to my Mail program

    Hi
    Until now, I have only had @verizon.net email accounts. I now how a @gmail.com email account
    I don't know how to configure my Mail program so I can receive gmail to my computer, and not have to get it using a Browser.
    I have attended to configure, but it does not work: I get the following:
    For Incomgin Mail Server I use:
    mail.gmail.com
    I get this response:
    The POP server “mail.gmail.com” is not responding. Check your network connection and that you entered the correct information in the “Incoming Mail Server” field. If it still doesn’t respond, the server might be temporarily unavailable.

    First off Gmail supports "imap" which will allow you to keep your computer Mail app, and gmail account in sync. I would suggest you setting gmail up for imap instead of POP.
    1. Open Mail go to preferences, select Accounts.
    2. In the account window in the left pane "Accounts" press the "+" button at the bottom to add a new account.
    3. An Account window will appear asking for information, select IMAP for account type, Description put what ever you wish such as "Gmail IMAP" or if you are going to have more that one accunt fro gmail the "User Gmail IMAP", Enter your Name, and your new Gmail address ex. "[email protected]".
    4. Enter the information for incoming mail. In the incoming mail server box type: imap.gmail.com, Your user name should appear in the User Name box automatically if it is incorrect the correct it, enter your password that you use to access the mail from the web with gmail. Then press Continue.
    If all the info is correct it will let you continue, as mail at that point actually goes out to that gmail server and attempts a login with that account and password, if it fails at this point then some info like your user name and password are incorrect. If it all goes well go to step 5.
    5. The next screen will be the Outgoing mail, in the Outgoing mail server: box type: smtp.gmail.com, select authentication and put in your username and password for that account like you did on the prev step. Then press continue. Mail will again go out to that server and attempt a log in to very the information. If all goes well then mail will come back with an account summary window, you can then press continue.
    That should do it, if it doesn't work post back.

  • Mail program no longer opens

    I have two problems that simulatenously appeared on one of my co-worker's eMac. She complained that she could no longer open her mail program or safari. I was able to set up firefox on her computer and it works fine. Both mail and safari will appear to open; and if you go to force quit, I can see both application in there.
    So I have a couple of questions:
    1) Are these problems related - is it as easy as reinstalling the applications?
    2) How can I back up the emails that she has stored on her computer?
    Thanks

    Re-installing Apple applications rarely resolves such a problem or any problems.
    This is usually caused by a required font problem.
    Check Multiple applications quit unexpectedly or fail to launch for troubleshooting steps.
    How can I back up the emails that she has
    stored on her computer?
    To backup all Mail.app data including account information, do the following.
    With the Mail.app quit and using the Finder, go to Home > Library > Mail. Copy the Mail folder and place the copy on an external hard drive used for backup purposes only or burn it to CD media.
    Using the Finder, go to Home > Library > Preferences > com.apple.mail.plist. The com.apple.mail.plist file stores all account information and general Mail.app preferences. Do the same with this file.
    Done.

  • Mail program not receiving mail, says server not responding

    Having a problem with my Mail program, my main email is not receiving mail and I've checked all the settings. I do receive the emails on my iPad and through iCloud on the Internet, but the emails will not show up through the Mail program.
    "There may be a problem with the mail server or network. Verify the settings for account “[email protected]” or try again. The server returned the error: The attempt to send data to the server “(null)” failed."
    Can anyone help me out? Thanks

    @AuntieKris,the only solution I've come up with was to delete the email account from the Apple Mail settings and re-add it.
    I have had the same problem happen to me a few times in the last month or so.
    It seems to happen when I switch between certain wireless and cabled networks at my work place.
    Indeed, when this happens I can still recieve emails on the ipad/iphone.
    Not very elegant solution but it works. I'm open to more user-friendly suggestions...
    FYI: I'm running Lion 10.7.2 and Mail 5.1.

  • Help! Mail program not working anymore!

    Hi there-
    All of the sudden my mac mail program is not working. I click on it, and it appears to launch, but then never starts up or anything, and I can't see the menu bar at the top when I click on the application icon.
    Could this be because I have too many mail messages? If so, how do I fix it???
    Help! I need my email account back!!
    Thanks.

    Hello Heidi.
    Check Multiple applications quit unexpectedly or fail to launch. Although this indicates when this occurs with multiple applications, the same troubleshooting steps apply.
    Perform the troubleshooting steps in the order provided with the exception of re-installing the Mail.app if you get that far. If the previous troubleshooting steps do not resolve it, IMO it is best to target the Mail.app preference file first and if you need the instructions for doing so, let me know.

  • Ready to dump my Mail program

    I have a similar problem as previous post "Password not accepted". I've been happy with Mail for years (version 1.2.5), but when I recently changed my password, that was the end of smooth runnings.
    No matter how many times I edit my password and double-check information in Mail settings, I get the following:
    "UNABLE TO RECEIVE MAIL There may be a problem with the mail server or network. Check the settings for account “******” or try again.
    The server error encountered was: The user name and password specified in Mail preferences were not accepted by the server. "
    or sometimes, for variety, it gives me this:
    "The server error encountered was: reading data from host mail bellsouth.net failed."
    I can send e-mail no problem. And I can log in to webmail no problem.
    I'm just tired of dealing with this. Assuming there is no easy fix, is there another stand-alone e-mail program available to OSX users?
    Imac G3 400Mhz   Mac OS X (10.2.x)  
    Imac 400Mhz   Mac OS X (10.2.x)  

    hi there--
    i would try setting up your account in a test user (in accounts in system preferences, just click the plus sign) to see if it works there. if it does, the first thing i would do would be to back up mail just in case http://docs.info.apple.com/article.html?artnum=301239 and then begin troubleshooting in the home folder. the first thing i would do would be to pull the com.apple.mail.plist to the desktop and restart the computer. if this helps the situation, then trash the file. if not, then put it back. let me know how that is going. [ 8 ) ]

  • How to use the Eudora e-mail program with new ports

    For those of you that still use Eudora as your mail program. Here is how I made the required changes for the new port settings
    1) Open Eudora and from the "Tools" drop down menu select "Personalities"
    2) In the "Personalities" pane - right click the account you want to change and select "Properties"
    3) In the "Generic Properties" pane change the following
       a) Change the SMTP server to    smtp.verizon.net      and leave the "Authentication Allowed" box checked
       b) In the"Secure Sockets When Sending" selection box pick "Required,Alternate Port" . This both turns on SSL
           and makes the port  number 465 as required by Verizon
    4) Click the "Incoming Mail" tab at the top and then make the following changes
       a) Change the POP server to     pop.verizon.net
       b) In the"Secure Sockets When Sending"  selection box pick "Required,Alternate Port" . This both turns on SSL
            and makes this port  number 995 as required by Verizon
    Thats it . It should work for you now. You need to do this for each "Personality" (Sub account) you have

    Eudora users may also need to make changes to Eudora's Options (Tools > Options) "Getting Started", "Checking Mail" and "Sending Mail" in addition to the changes for each Eudora Personality. I outlined those changes in the "Eudora & server changes" thread--note there is a typo ("smpt" rather than "smtp") in the first post (couldn't edit that post to make the correction) in the thread so make sure to check the entire thread as a later post shows the correct entry.
    I had problems with Eudora sending mail (I didn't have problem with incoming mail because I don't use Verizon's servers for that) until I made changes to both Personality accounts and to the Option/suboptions noted above.
    Did you get things to work properly without having to make changes in Options?

  • How can I empty anApple e-mail program mailbox.  I have thousands of message I wish to delete, but am unable to do so.  Any suggestions?

    How can I empty an Apple e-mail program mailbox.  I have thousands of message I wish to delete, but am unable to do so.  I open the e-mails on my laptop, so I don't usually need to open them on the iMac.  Whenever I use select all, and the move to trash, they always seem to reappear again.  Prospectively, I know I can change the e-mail settings in preferences, but that doesn't help get rid of what is already there.  Any suggestions?

    You mention 2 computers. Not sure how one relates to the other. Are the messages on one and not the other?
    Are they in the Inbox, or another local folder you created? If a local folder, delete the folder.
    Do you have anything used to sync messages between the 2 computers? If so, disable it.
    Select the messages and choose Delete instead of moving to the trash.
    If that doesn't work, rebuild the mailbox, quit Mail and reopen and try again.
    If all fails, delete the account from the computer. Since it is POP, when you re-add the account, there won't be any messages to download.

  • How can I save mail messages to my computer and not my mail program

    My mail program seems to be slow.  I'm not sure why.  I get the spinning ball frequently.  I need to save mail messages sometimes for a few years and there are hundreds of emails. Is it better to save them on my computer than my mail program?  I may need to retrieve them at some other time so they need to be readable.  Is that possible?
    I'm using OS X 10.9.4. I have a 3.06 GHz processor and 12 GB of memory.  Thanks

    You can select to export a folder to save as a .mbox file. This file would need to be imported if you wanted to view the messages.
    Select mailbox (folder)
    Under Mailbox in the Menu bar select Export Mailbox...
    You might also want to check out the demo for EagleFiler by the author for SpamSieve. You could view and search the messages archived in EagleFiler.
    http://c-command.com/eaglefiler/
    Regarding Mail being slow....
    Is it only Mail that is slow?  How much free space on your drive? Use Disk Utility to find available space.

  • HT4597 I can no longer access my mac mail in the Mail program - only on icloud. I would like to have both my aol account and mac account in one place like it was. Anything I can do?

    I can no longer access my mac mail in the Mail program - only on icloud. I would like to have both my aol account and mac account in one place like it was. Anything I can do?

    iCloud's mail server settings are different from MobileMe's. Strictly speaking Lion 10.7.2 is required for iCloud, and on that Mail is set up automatically.
    Snow Leopard cannot access most of iCloud's facilities, however you can set Mail up manually to access your email. The method is described here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudmail.html
    The situation with iCloud and Snow Leopard is described in detail here:
    http://www.wilmut.webspace.virginmedia.com/notes/icloudSL.html
    iCloud cannot access your AOL account (the MobileMe facility for checking external POP accounts does not exist in iCloud) - you will have to do this in the Mail application in the usual way. You could of course set up forwarding from your AOL account to iCloud (assuming they provide this facility) but you will not be able to reply using iCloud's SMTP server with anything other than the iCloud address as the 'From' address.

Maybe you are looking for

  • Drilldown in Smartforms , possible ?

    Requirement To create drilldown report from output screen of smartforms Question Is it possible to do that ? Please mention or kindly show me some alternative ideas. Actually, I convert smartforms to PDF and need drill down from PDF. But drilldown in

  • How to avoid that two or more people altering the same Sales Order

    I'm looking for a way to avoid that two or more people altering the same Sales Order at the same time. If someone has entered a Sales Order in the system and something needs to be adjust it can be done by two or more people at the same time. The prob

  • Pagination scheme. Is it translatable?

    Hi All, how to translate pagination scheme outward? I would like to translate into Russian UI-elements like 'Previous', 'Next', 'row(s)'. Thanks

  • Best way to erase data

    Hello, So because of a problem with my display, I have to return my new 27" iMac to Best Buy. I want to wipe out all of my personal data first though. Whats the best way to go about this? Obviously I have the install discs that it came with. I also h

  • Playlist Broadcaster problems after 24 hours

    I have a simple video (MPEG4 video/AAC audio) that continually loops. It seems that after 24 hours, when the video is access in QuickTime Player or the plugin in a web page that the audio will drop out but the video continues to play OR the video wil