// Look Below::

  String emailsubject = "NewsLetter!";
  String finaltext = "The Newsletter ::";
  String EmailFrom ="[EMAIL PROTECTED]";
   Message newMessage = new MimeMessage(sendMailSession);
   newMessage.setFrom(new InternetAddress(EmailFrom));
   newMessage.setRecipient(Message.RecipientType.TO, new
InternetAddress(email));
   newMessage.setSubject(emailsubject);

// This Line below does the linking

  String htmlText = "<a href=\"http://www.alltechneeds.com\";><IMG
SRC=\"http://www.alltechneeds.com/images/welcome.gif\";></a>";
newMessage.setContent(htmlText, "text/html");

   transport = sendMailSession.getTransport("smtp");
   transport.send(newMessage);

I've tested this it works, you must be doing something wrong, also keep in
mind some email servers do not have the ability to send html emails.

I'm working now on a flash email.

----- Original Message -----
From: "Warty, Koustubh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 13, 2001 10:46 AM
Subject: Re: JavaMail problem


> Hello ,
>    Yesterday in response to my JavaMail problem I received 2 solutions.
But I was not able to succesfully run either of them.
>
>  The 2 suggestions were -
>
> 1.             <a href =\"a.jsp\">here</a>
>
> 2.     Set Content Type = "text/html" also use single quotes (') instead
of double as follows
>        String abc = "Hello! this is test msg. Click <a href
='a.jsp'>here</a>"
>
>  I tried both did not work. Where do I add the set content type ? I tried
it before setting the message but .....
>
>  In case of case No. 2 it just prints the message as -
>      Hello! this is test msg. Click <a href ='a.jsp'>here</a>
>  In case of case No. 1 it just prints the message as -
>      Hello! this is test msg. Click <a href ="a.jsp">here</a>
>
>
>  Please do let me know.
>
>  Regards,
>  - Koustubh
>
>
>
>
> -----Original Message-----
> From: King Maurice [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 3:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: JavaMail problem
>
>
> TRY
>
> <a href =\"a.jsp\">here</a>
>
>
> ----- Original Message -----
> From: "Warty, Koustubh" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 12, 2001 3:35 PM
> Subject: JavaMail problem
>
>
> > Hello,
> >    I have a problem in using Java Mail thru JSP.  I use the sample code
> that the Sun has in the Java Mail software. In that the TO, FROM, SUBJECT
> work fine. Also the Message works fine if I say on the JSP page like
> >  String message = "Thanks for placing an Order";
> >
> >  But if I want to pass a link in that message string something like -
> >  String message = "Thanks for placing an Order. You can view your order
by
> clicking here." I want the 'here' to be a hyperlink. I tried various
> combinations in the message string by using the HTML <a href
> ="a.jsp">here</a>. But it does not seem to understand this syntax.
> >
> >   Please help me.
> >
> >   Regards,
> >   - Koustubh
> >
> >
> >
> >
> >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to