upanshu vaid wrote:Hi,
The requirements that I want to implement in Java
1-Client sends mail using outlook to IMAP Email server .
No they don't.
IMAP is a message
retrieval protocol. To
send a message, you need an SMTP server. As it happens, Microsoft
Exchange offers both functions in one application, but they are entirely separate. On my Linux machines, Sendmail or Postfix act as the SMTP MTA server. Dovecot is the program that provides my POP/IMAP(s) services. They're from different developers and work on different TCP/IP ports.
Although you can do brute-force mail functions - the original SMTP and IMAP services were designed using text-based protocols - the easier way is to use JavaMail.
The full details are more than we can go into here, but basically, you create a mail, set its recipient(s), subject, body, attachments and so forth, then send it off to the mail server. You may have to present credentials (login) to the SMTP server.
On the receiving side, you log into the IMAP server, identify yourself, then you can browse the IMAP folder structure and retrieve selected messages. The same message object components apply as you use when creating and sending email.