• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Email body

 
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The requirements that I want to implement in Java
1-Client sends mail using outlook to IMAP Email server .
2-there is a utility which is written using core Java and Java mail api.
3-I have to read the emails that are on IMAP server.
4- the email body which can have normal text, image,table, html etc.
5- problem I am facing is that I am not able to convert the email body to pdf or word doc.
Kindly help as I am not found the right solution for long time.
Thanks
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply
Please help me to resolve my query
Hi,
The requirements that I want to implement in Java
1-I am reading email from IMAP Email server .
2-there is a utility which is written using core Java and Java mail api.
3-I have to read the emails that are on IMAP server.
4- the email body which can have normal text, image,table, html etc.
5- problem I am facing is that I am not able to convert the email body to pdf or word doc.
Kindly help as I am not found the right solution for long time.

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me get this straight.

You can already connect to the IMAP server for reading emails.
You can already retrieve messages.
All you need to do is convert them to PDF or Word document.

Is this correct? If so, you may want to check out OpenOffice.org. You can call it to do the conversion for you. You'll have to check out its documentation for the specifics. As for PDF, I know have used iText in combination with YAHP (http://www.allcolor.org/YaHPConverter/) in the past to convert (tidy) HTML to PDF.
reply
    Bookmark Topic Watch Topic
  • New Topic