Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes Can't send a html based mail using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can Watch "Can New topic

Can't send a html based mail using java

Azz Romaysa
Ranch Hand

Joined: Dec 08, 2004
Posts: 66

What I try to do is that mt webapplication will send a mail when a user is succesvolly registered. The problem is that I can't send a html based mail. When I open the mail I get just the text but not the images ...

This is my code of

Could someone help me to fix this problem?

Abu Romaysa.
[ December 22, 2004: Message edited by: Azz Romaysa ]
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
You're passing SponsorMail as a parameter to setContent, but nowhere in the SponsorMail String do I see anything related to images! If it's HTML and there's supposed to be an image, then why isn't there an img tag that references an image file? It appears to me that you're not seeing any images because you didn't specify any!
I agree. Here's the link:
subject: Can't send a html based mail using java
Similar Threads
SHA1 digest error for javax/mail/MessagingException
Problem with sending E-mail
Trying to implement a mail queue in JavaMail using ExecutorService
JavaMail not working
Sending a HTML mail