accessing yahoo and rediff mail using java mail api - java

How can i use the java mail api for showing mail from yahoo and rediff ?
I used the same code as with gmail mails but now it is giving the :
***javax.mail.AuthenticationFailedException***

You might want to have a look at what the java mail client columba does. The actual imap and pop clients are extracted into a subproject, that can be used independently from the app.

Related

Retrieving mails by EWS and sending with Java Mail API

I am during porting an application using IMAP and SMTP to communicate with mail server. At the beginning I planned to change only IMAP protocol to EWS API, but I am wondering is even makes sense/is possible? I mean, I would retrieve mails with EWS and perform actions like reply or archive with Java Mail API. The first complication is to map Object representing email message in EWS (EmailMessage) to analogue one in Java Mail API (Message). But even if I would able to, I am not sure if its reliable. In this case, should I port whole communication with mail server to EWS?
Best Regards!
It would probably be better if you could do it all with EWS or all with JavaMail.
If EWS can produce a MIME formatted byte stream for the message, you can use that to construct a JavaMail MimeMessage and then handle the rest with JavaMail, if you need to.

Java - Add message to inbox

How add message to inbox folder from java app? Right now to do this i use the same FROM and TO addresses (javamail -> smtp). Mail server is remote (Exchange), so i cant get access to it file system.
If your mail server is Exchange 2007 or Higher, I'd look into EWSJavaAPI Microsoft made a nice interface to all of the Exchange Web Services calls (no messing with dirty dirty SOAP)

Is there any java library to access client's emails?

I am looking for a java library to access(show) client's emails in a web app.
For instance user comes to the site, enters credentials, smtp and all this stuff (like when doing Import in Thunderbird or Outlook) and our website can show him his emails in the browser...
Are you aware of such library? Is this possible?
IIRC, JavaMail is mostly for sending emails but what I need is to access and list client's emails.
there many opensource client mail tools which can be coustomised as you need, please check below below
Client Emails Access
Update :
check this Chilkat
Here is a sample code how-to-create-an-e-mail-client-in-java
Yes Javamail can do exactly what you are asking. Javamail isn't for just sending emails. You can access a user's mailbox. Sending emails is over the SMTP protocol. Javamail supports SMTP, POP3, and IMAP. You're interested in POP3 or IMAP.
http://www.oracle.com/technetwork/java/javamail/index.html

How to send an email to a java program

I'd like to write a program, probably a servlet or something to run on the a google app engine that I can send an email to. So not a program to send email, but one that can receieve it and parse it.
My question is, what code or API are out there that can receive an email?
Basically on your google app engine you can use an inbound mail service.
Please see this documentation for more information.
http://code.google.com/appengine/docs/java/mail/overview.html#Receiving_Mail_in_Java
You cant send an email to a program, you send an email to a server, so what you are looking for is a way to access an email server via your program. Unfortunately there is no single solution here, you need to configure your program for every different email account/server you want to access. (If you have ever set up an account in outlook or something like it you will get the idea)
For example here is a link to the gmail api, you could use this to access gmail accounts
http://code.google.com/apis/gmail/
You need to have a mailbox to send message there and you could read messages with the code like this: http://www.java2s.com/Code/Java/Network-Protocol/GetEmailMessageExample.htm
This can be done with a built in Java library.
javax.mail
Check out this link. It should be able to help you get started.
This won't work for every mail server, but depending on your setup it might help.
To send an email to a Java program, that program must be running. Generally that means a server style (aka service) receiver is favored.
For the email to be received, the Java service must understand an email protocol. There are a number of protocols, but SMTP is the standard for receiving email. Once you have a service that understands SMTP protocol for receiving email, you have written a mail server.
Note that most people don't care to write a mail server, as a mail client needs to connect to the server and pull the email to make it readable. Keep this in mind when designing the solution to your problem.

How to read Google/Yahoo mail inbox using java?

I want to make a program which can read email (subject, sender, body message) in Yahoo & Google mail.
I originally thought to use POP3 but I read on the internet POP3 can't read the mail box.
Does anyone know of / can suggest a Java library for this problem?
Peek here:
Getting mail from GMail into Java application using IMAP
Java itself provides Java Mail APIs to enable mail functionalities. You can also find third party APIs at here.
GMail provides an ATOM feed of unread mail that uses HTTP Basic authentication:
http://mail.google.com/mail/feed/atom

Categories

Resources