Readinjg mail from Microsoft Exchange Server

Hi,
I neeed java code to read emails from Microsoft Exchange Server.Can somone please share the code.
Thanks in Advance
Rama

Thank you very much for the reply.
I tried to write the code .At one place I am getting the below error.
DEBUG POP3: server doesn't support TOP, disabling it
Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
     at com.sun.mail.pop3.POP3Folder.createMessage(POP3Folder.java:333)
     at com.sun.mail.pop3.POP3Folder.getMessage(POP3Folder.java:314)
     at javax.mail.Folder.getUnreadMessageCount(Folder.java:761)
     at InboxReaderIMAPLast10.main(InboxReaderIMAPLast10.java:41)
Pls help me in fiding the reason
Rama

Similar Messages

  • 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.

  • Mail on Microsoft Exchange Server

    It seems as though this topic has been beaten to death. I've read nearly every post about getting Mail to work on Microsoft Exchange servers, but I can't make it work on ours.
    I am fully functional on the Exchange server using Entourage. However, I simply cannot figure out how to make Mail work on the Exchange server. It seems like some have had luck using the account type IMAP and some using account type Exchange.
    I've entered nearly every possible combination of settings, but have had no luck. Is there at least an explanation as to why Entourage will work but Mail won't? I'd still love to get Mail working...any ideas?
    Any help is much appreciated!

    Hi pblakes9,
    I can try and help, I have 10 Macs running 10.4.8 and 3 running 10.4.10 all using Apple Mail with the Exchange Server and no problems.
    I have them all set up the same using the account type "Exchange".
    Before Apple added that as an option, we had them set up using IMAP.
    However it seams that even the account type called "Exchange" is using a IMAP protocal. (excuse me if that is not the right term) What I am trying to say is that our IT people said that no matter if I use the "Exchange" or "IMAP" account type, the Mac talks to the server using "IMAP".
    What this ment to us is IT needed to make sure that "IMAP" was enabled on the server.
    If you are using Microsoft Entourage version 11 (from Office 2004). This does not use IMAP. So this would still work on your Mac even if IMAP wasn't enabled on the server. However Microsft Entourage version 10 did use IMAP.
    Chris
    Dual 2.0 GHz G5, Dual 1.2 GHz G4, 35o MHz G3, Old G3 Tower   Mac OS X (10.4.8)  

  • Need to send mail from Microsoft Exchange 2007 account(different from Gmail) on behalf of another Gmail ID. How to configure that ?

    I have a Gmail ID (e.g [email protected])
    I have a Exchange ID (e.g  [email protected])
    I need to configure exchange account (2007)  such that I can send a mail from my Exchange account but at the receiver end it looks like it was sent from  ([email protected]).
    Both the accounts are my accounts.
    I need this because I do not have access to my Gmail account from place where I access the internet and I need to send the mails from my Gmail account only.

    So you want to spoof your e-mail address.
    You can make your Exchange server send as any address you want.  Just create a different mailbox with that address as the primary (reply) address.  It has to be a different account.
    However, be aware that many systems to which you send such mail to will bounce it as suspected spam because they'll detect that your server is sending mail from Gmail but your server is not Gmail.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Mail and Microsoft exchange server problems

    My company is moving to Microsoft exchange servers now, and for some reason, Mail cannot work.
    There are several settings that are possible to set in Thunderbird, but that are not even options in Mail. These are settings such as "TLS".
    Is there any way to make the same settings in mail that are possible in Thunderbird?

    Hi Budgie
    I can confirm that provided your administrator configures the Exchange server for IMAP (Mail uses IMAP to connect) that yes, Mail can be used effectively with Exchange and messages will remain on the server; though the set up can be misleading.
    For me at least, when you get to Outgoing Server Settings, the set-up panel does not allow you to enter an authentication type, and entering my user name and password will get the following response:
    The SMTP server “xxxxx.xxxxxxxxxxxxxxxxxxx.com:username” is not responding. Check your network connection and that you entered the correct information in the “Outgoing Mail Server” field. If it still doesn’t respond, the server might be temporarily unavailable.
    If you continue, you may not be able to send any mail.
    When I click continue, the authentication panel comes up, and by changing authentication to NTLM and entering the Domain name - everything works perfectly!
    The only other nuisance is that Mail looks at the Exchange Calendar and Personal Folders/Contacts folders as mail folders, but cannot display the contents in the way Outlook or Entourage does, and I have not found a way of eliminating them from the folder list.
    I hope this helps.

  • IOS 4.3.3 Cannot Get Mail from Comcast Exchange Server

    I upgraded both my ipad and iphone to 4.3.3 yesterday and now I cannot access email from the Comcast Business Exchange server.   I have not changed any of the parameters on the ipad or iphone.  When I try to access the Comcast Server at mail.hmc1.comcast.net I get the message Cannot Get Mail on both my ipad and my iphone.  Everything worked great before the 4.3.3. upgrade.   All of my gmail accounts and my pop3 email account still work on the ipad and iphone.   Please help

    Have you tried removing the accounts and re-adding them? That generally seems to work in an "if all else fails" situation but I've noticed that sometimes, troubleshooting can be too stressful, and it is more worth it to spend 2 minutes re-creating the account and another 10 minutes to let everything sync up.
    Just my $0.02

  • Settings on Microsoft Exchange Server  for sending Email from BW to emailid

    Hello Everybody,
    I wanted to know that for sending Email from SAP System (that is via Information broadcasting feature of BW )to Email IDS of individuals do we need to make any configurations on Exchange Server as well or some RFC between Microsoft Exchange Server and BW .I have made all settings for SMTP through SCOT transaction but still not able to send mails.From our Exchange Server,the connector is removed ,do we need to reconnect it for this purpose.kindly please tell me wt all configurations do i need to make on Mail server for sending Emails as iam not able to do the same now.If somebody can send a PDF/Word document in support for the same on my email Id [email protected] ,i shall be highly obliged.Your help shall be appreciated ,kindly revert at earliest.
    Regards,
    saumya

    Hi Somya,
    Looks like you are deep into Information Broadcasting. I am sure you must have seen this, still sharing with you -
    SAP Notes -
    875136 - Node ID is missing in the status message for RFC connection
    455140 - Configuration E-mail, fax, paging/SMS via SMTP 
    regards
    Vikash

  • Downloading data from MS exchange server

    Hello Gurus,
    i have a requirement to download user email information (first name, last name, nt id and email etc..) from Microsoft Exchange server (Outlook). Is there a way to do this in PL/SQL?

    I'm assuming you mean "and into an Oracle database".
    Exchange uses a proprietry format, you are very unlikely to connect to it directly. You could use some .Net tools out there, but the better option is to query the Active Directory server that runs it using LDAP.
    It depends of course on your language - but I've used Perl and the standard LDAP query module to query this sort of info from Active Directory in just a few lines of code. It wouldn't take much to then insert to a database.

  • Mail bouncing from the Microsoft Exchange Server.

    Hi  All,
               This is Brajesh from Mobinius Technologies. When ever  we are sending mails to our client those  who are using Microsoft exchange server. Our mail are getting rejected as spam content . How to resolve this
    issue. Please help us.   

    Hi,
    According to your description, I understand that failed to send message to recipient and rejected as a spam.
    If I misunderstand your concern, please do not hesitate to let me know.
    I want to double confirm whether all account or some special account contain this domain experience this question, how about internal and external mail flow?
    If this issue only occur on some special recipient, it indicate that target domain may be configured to reject your message, I recommend to contact its administrator to change the setting.
    Otherwise, please try to enable protocol log to get more details about this issue. More details about Protocol logging, for your reference:
    https://technet.microsoft.com/en-us/library/aa997624(v=exchg.150).aspx
    Best Regards,
    Allen Wang
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Allen Wang
    TechNet Community Support

  • When sending e-mail messages to a mail-enabled public folder that have been replicated from old Exchange Server 2000/2003/2007, Exchange Server 2010 environment mails are rejected with NDR.

    Hi, I would like to share with you issue that I’ve solved regarding mail-enabled PF that migrated from Exchange 2000/2003/2007 to 2010, I’ve searched & contacted my MVP leader – there’s no official KB regarding this issue right
    now, so I’m posting here in order to share this among others.
    Note: There’s article(s) that talked about PF replication from Exch2000/2003/2007 to 2010 – this is the same issue as well.
    Symptoms
    E-mail messages that been sent to mail-enabled public folder in Exchange Server 2010 environment rejected with the following NDR:
    “#< #5.2.0 smtp;554 5.2.0 STOREDRV.Deliver.Exception:ObjectNotFoundException; Failed to process message due to a permanent exception with message The Active Directory user wasn’t found. ObjectNotFoundException: The Active Directory
    user wasn’t found.> #SMTP#”
    Sometimes Exchange Server 2010 is documented as well Event ID 1020 on the Event Viewer with this information:
    “Log Name: Application
    Source: MSExchange Store Driver
    Event ID: 1020
    Level: Error
    Description:
    The store driver couldn’t deliver the public folder replication message "Hierarchy ([email protected])" because the following error occurred: The Active Directory user wasn't found.”
    Cause
    In an environment where Microsoft Exchange Server 2000 or Microsoft Exchange Server 2003 previously existed, and all those servers have been removed, there is a chance that an Administrative Group (First Administrative Group or another custom Administrative
    Group) remains with a Servers container, but no servers inside it.
    During replication, when the Exchange 2010 Store Driver sees the empty Servers container in Active Directory, it's expecting a System Attendant object inside the container and when it is not found the error occurs.
    Resolution
    To work around the issue, delete the empty Servers container. This can't be done through Exchange System Manager. Use the ADSI Edit tool to remove it using the following steps:
    Warning If you use the ADSI Edit snap-in, the LDP utility, or any other LDAP version 3 client, and you incorrectly modify the attributes of Active Directory objects, you can cause serious problems. These problems may require you to reinstall Microsoft Windows
    2003 Server, Microsoft Windows Server 2008, Microsoft Exchange 2010 Server or both Windows and Exchange. Microsoft cannot guarantee that problems that occur if you incorrectly modify Active Directory object attributes can be solved. Modify these attributes
    at your own risk.
    1.      
    Start the ADSI Edit MMC Snap-in. Click Start, then
    Run, and type adsiedit.msc, and then click OK.
    2.      
    Connect & Expand the Configuration Container [YourServer.DNSDomainName.com], and then expand
    CN=Configuration,DC=DNSDomainName,DC=com.
    3.      
    Expand CN=Services, and then CN=Microsoft Exchange, and then expand
    CN=YourOrganizationName.
    4.      
    You will see an empty Administrative Group. Expand the
    CN=YourAdministrativeGroupName.
    5.      
    Expand CN=Servers.
    6.      
    Verify there are no server objects listed under the
    CN=Servers container.
    7.      
    Right click on the empty CN=Servers container and choose
    Delete.
    8.      
    Verify the modification, and try to send again the E-mail to the mail-enabled public folder.
    Applies to
    Exchange Server 2010, Standard Edition
    Exchange Server 2010, Enterprise Edition
    Netanel Ben-Shushan, MCSA/E, MCTS, MCITP, Windows Expert-IT Pro MVP. IT Consultant & Trainer | Website (Hebrew): http://www.ben-shushan.net | IT Services: http://www.ben-shushan.net/services | Weblog (Hebrew): http://blogs.microsoft.co.il/blogs/netanelb
    | E-mail: [email protected]

    Sounds like you are looking in the wrong Administrative Group container which is why you are seeing your Exchange 2010 servers in there.
    When you install Exchange 2003 only you will see a container named by default as "CN=First Administrative Group" container. But this could be named anything if you changed the Organization Name on the installation when you installed the first
    Exchange 2003 server into the domain/forest. 
    You will notice that when you install Exchange 2010 part of the AD setup is to create a new configuration container and is named by default "CN=First Administrative Group (FYDIBOHF23SPDLT)".
    So it sounds like you are not looking in the right location within ADSIEdit. 
    You may find the following article also helpful for this issue which is the same resolution:
    http://blogs.technet.com/b/sbs/archive/2012/05/17/empty-cn-servers-container-causing-issues-with-public-folders-on-small-business-server-2011.aspx
    I recommend though that you ensure your Exchange 2003 servers are fully uninstalled or no longer present in your environment before you go deleting the Servers container though.. The following Microsoft article will help with this:
    http://technet.microsoft.com/en-gb/library/gg576862(v=exchg.141).aspx

  • Error while connecting to Microsoft Exchange server using javamail: "com.sun.mail.util.MailConnectException: Couldn't connect to host, port: host name , 993; timeout -1"

    I am trying to read mails from my outlook microsoft exchange server. Following is the code:
    public void readEmailsFromOutlook(/*String host, String username, String password*/ ) throws MessagingException, IOException {
          String host = "hostname";
          String username = "domain\\username";
          String password = "password"
          // Create empty properties
          Properties props = System.getProperties();
          props.setProperty("mail.smtp.auth","true");
          props.setProperty("mail.store.protocol","imaps");
          props.setProperty("mail.imap.auth.plain.disable","true");
          props.setProperty("mail.imap.host",host);
          props.setProperty("mail.imap.port","993");
          props.setProperty("mail.imap.user",username);
          props.setProperty("mail.imap.pwd",password);
          props.setProperty("mail.imap.debug","true");
          props.setProperty("mail.imap.ssl.protocols","SSL");
          props.setProperty("mail.imap.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
          props.setProperty("mail.imap.socketFactory.fallback", "false");
          props.setProperty("mail.imap.socketFactory.port", "993");
          // Get session
                     Session session = Session.getInstance(props, new ExchangeAuthenticator(username, password));
          session.setDebug(true);
          // Get the store
          Store store = session.getStore("imaps");
          //Store store = session.getStore();
          store.connect(host, username, password);
          // Get folder
          Folder folder = store.getFolder("INBOX");
          folder.open(Folder.READ_ONLY);
          BufferedReader reader = new BufferedReader(new InputStreamReader(
              System.in));
          // Get directory
          Message message[] = folder.getMessages();
          for (int i = 0, n = message.length; i < n; i++) {
            System.out.println(i + ": " + message[i].getFrom()[0] + "\t"
                + message[i].getSubject());
            System.out.println("Read message? [YES to read/QUIT to end]");
            String line = reader.readLine();
            if ("YES".equalsIgnoreCase(line)) {
              System.out.println(message[i].getContent());
            } else if ("QUIT".equalsIgnoreCase(line)) {
              break;
          // Close connection
          folder.close(false);
          store.close();
    But it threw the following error:
    DEBUG: setDebug: JavaMail version 1.5.1
    DEBUG: getProvider() returning javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle]
    DEBUG IMAPS: mail.imap.fetchsize: 16384
    DEBUG IMAPS: mail.imap.ignorebodystructuresize: false
    DEBUG IMAPS: mail.imap.statuscachetimeout: 1000
    DEBUG IMAPS: mail.imap.appendbuffersize: -1
    DEBUG IMAPS: mail.imap.minidletime: 10
    DEBUG IMAPS: trying to connect to host <hostname>,port 993, isSSL true
    com.sun.mail.util.MailConnectException: Couldn't connect to host, port: 10.75.250.60, 993; timeout -1;
      nested exception is:
    java.net.ConnectException: Connection refused: connect
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:693)
    at javax.mail.Service.connect(Service.java:345)
    at javax.mail.Service.connect(Service.java:226)
    at com.capgemini.utilities.Utilities.readEmailsFromOutlook(Utilities.java:1261)
    Whats wrong with my code?
    Please help!!!!

    You're using the "imaps" protocol, but you've set properties for the "imap" protocol.  Change all the property names from mail.imap.* to mail.imaps.*.
    Also, get rid of all the socket factory properties.
    If you still can't connect, see these connection debugging tips.
    Most likely you're using the wrong host name or port number.  In almost all cases, it's better to just let JavaMail choose the correct port number.

  • Can someone help with my Mail not working with my Microsoft Exchange server?

    I am trying to set up my Mail account. I am using the Microsoft Exchange server. I've been using Entourage, but wanted to switch to using the Mac's Mail. I used the same settings I had with Entourage, but with Mac Mail I'm getting this error: MFEWSErrorDomain error 56. From some of the other posts I saw, it seems as though no one has any answers, but I figured I'd ask anyway.

    There is no single cause of this problem and hence no single solution. There are several suggestions in this thread, if you haven't come across it, one of which might help:
    https://discussions.apple.com/thread/3953623?start=0&tstart=0
    Regards.

  • Problem e-mailing reports after migrating to new Microsoft Exchange server

    Hi,
    I am now unable to e-mail (SMTP) reports to anyone in my company because we just migrated to a new Microsoft Exchange server.  Anyone know how to get rid of this message?
    Status: Failed 
    Printer: The instance is not printed. 
    External Destination: Mail the instance to "____________" with a subject of " %SI_NAME% %SI_STARTTIME% ". 
    Data Refresh Settings:  Use the server defaults. 
    Start Time: 8/4/09 1:00:18 PM 
    End Time: 8/4/09 1:01:07 PM 
    Server Used: gmmc-crs.reportjobserver 
    Error Message: server error. SMTP_E_TCPSOCKET_OPEN(2): CrystalEnterprise.Smtp 
    We tried changing the gmmc-crs.reportjobserver with no luck.
    Thanks,

    Hi,
    You need to start with your exchange logs and possibly enable tracing on your BO webi/crystal/destination job servers (depending on the type of report and whether or not it is scheduled) to get an idea of how far down the line the SMTP connection is getting.
    You could also confirm a few key things:
    Have the SMTP destinations on your BO servers been updated with the new SMTP server info
    Can you telnet to the mail server on port 25 from the BO server -  if not, then check the firewall between the two servers and change the existing ruleset to allow connectivity to the new server
    Possibly the old mail server didn't require authentication and the new server does, you could test this through telnet?

  • Accesssing Mailboxes,Mail Information from Microsoft Exchange

    Hi,
    I want to know how we can access the mailbox information and information of a particular mail like messagebody,headers from Microsoft Exchange using JNDI. Any body who knows let me know whether it is possible and if yes how to achieve this.
    I already can able to get user information and exchange configuration.
    Waiting for a quick reply.
    Thanks.

    I want to assume you are talking about reading a Mailbox information(Attributes) from Microsoft Exchange using JNDI.
    If this is what you mean, I say it is very possible.
    The JNDI Tutorial will help you out. These are the step u will need to take.
    1. Define a collection item you will use to hold your exchange server information and provider information. The Hashtable component is mostly used.
    2. Create an intance of your Exchange Server context.
    3. You can then do a search for the mailbox recipient in the context server.
    4. you can then begin read the mailbox attribute from the Attibute object you had search for in step 3 above.
    You should please use look thru the JNDI Tutorial topic Naming and Directory.

  • Microsoft Exchange server / OSX / Mail / entourage

    Just a quick question about this, as a friend of my Dad's has been giving him grief because he doesn't ever receive receipts that emails have been received / opened / read etc.
    As far as I know Apple Mail doesn't support Microsoft Exchange Server, but Entourage does - but is it as simple as my Dad using Entourage, or does it need to on a network using Microsoft Exchange Server?
    And if so, does this mean that two, common or garden home PC users using Windows Mail or Outlook wouldn't get email receipts from each other either?

    what would the situation be with two, bog standard home PCs using XP/Vista and Outlook Express/Windows Mail - would they generate and receive receipt notifications with each other?
    Windows Mail and Outlook Express both support receipts (do a web search to find more information and instructions). But they will get receipts only if the receiving email client supports them, so the recipient must also be running one of those two applications or one of the other rare email applications that does. And receipts in Internet-standard email really doesn't mean much; it may return even if the email is selected, or, as is apparently the case with both Outlook Express and Windows Mail, the recipient can disallow sending back the receipt which if true rather defeats the purpose.
    where does the Microsoft Exchange Server come into it, which was what I thought powered these?
    It may or may not. Both Outlook Express and Windows Mail are standard email applications and work with any standard email server. If the ISP/company/organization is using Exchange and has it set up for POP and/or IMAP, you can use any email application with the server including OE or Windows Mail. But you don't get any of the features an Exchange Server provides: shared calendaring, "real" delivery/read receipts (ones the user can't disallow), etc. For those you must use Outlook.

Maybe you are looking for

  • OS X migration

    Hi to all, I have two macbook pros, one 17" 1st generation and one 15" 2nd generation, I needed the system and the applications from the 15" on the 17", so I replace the hard drives and now the 17" has some problem when I need to log in to the system

  • HT1212 Because it says ipod disabled I cant get it to reset, i try holding down the sleep/wake button and home or either or and nothing happens.  what now?

    The i pod is disabled I cant conect to i tunes because it says to enter password.   I have followed the steps to try a hard reset by holding down just the sleep/wake button or that and home button till the slidder bar showes which is not happening  

  • Licensing horror

    Hi I just took over program managing of Adobe installation and licensing at a school. We are at some volume licensing program that is expireing and is leaving us with CS6, thats fine. Right now I'm in the confusion phase. I've given it a couple of ho

  • Reports issu

    Dear All, Our env 12.1.3 on Solaris 10, We are running balance sheet report in pdf format, it is displaying complete report. When we run same balance sheet report in postscript format than part of the reports is displaying it is cutting from the righ

  • NEO2 Audio out not working & Mobo Review

    Everything finally working great! Have all the latest live updates and after some hiccups getting the system built, it appears to be everything MSI promised it would be. I have 3 80 Gig SATA drives, P4 2.53 GHZ, 1 Gig Corsair ddr400 memory in dual mo