link in java

hi guys

I have a method to send a email which goes like this

public boolean sendEmail(String id){
String from = "blabla@bla.com";
String to = "blablabla@bla.com";
String subject = "You have a new message;
String text = " you have new message" +
      "Please log into the application and take a look."

I want the application to be a hyperlink which should point to +"http://localhost:9081/flexweb/login.jsp"  .

any idea how i can do that?

thanks.


            
royjaydAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Such a url would only be of use to people receiving mail on the same machine as the one running a service on port 9081. Is that what you want?
0
for_yanCommented:

Do you know which mail program are using your recipients?

I don't think you can do it for all possible email clients
which people use, but for some most popular you can do
something

In particular in Outlook which I use any strings like you showed
in the text of the message (maybe sperated by spaces from
other stuff will be shiown and will act as links)
0
royjaydAuthor Commented:
>>>Such a url would only be of use to people receiving mail on the same machine as the one running a service on port 9081. Is that what you want?

yep, already know that. Dont worry about the actual URL value. that is my dev box URL. When application goes to production the URL value will be the one which can be accessed from any system.

thx.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

royjaydAuthor Commented:
for_yan, the email is using Outlook in my company.

thx
0
CEHJCommented:
You just need to use an html-formatted mail with a link in it
0
for_yanCommented:
We are using Outlook and I just put http://... in the body of the
email like that:

          String sep = System.getProperty("line.separator");
      body += sep;
            body += "http://myhost.mycompany.com:8100/myfolder/myFile.html" + sep;

I don't even specify html in the header. They are all clicking and are all happy
0
for_yanCommented:
If you want to make a link out of it, like say

   String sep = System.getProperty("line.separator");
      body += sep;
body += "Click <a href=\"http://myhost.mycompany.com:8100/myfolder/myFile.html\">here</a>" + sep;

then you swould probably need to have html in the header
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
royjaydAuthor Commented:
good one for_yan. works for me.

thx
0
for_yanCommented:
Great!
0
for_yanCommented:
By the way, I recently had a challenge very closely related to this question.

We have some home grown application called PBB or something, and I guess they have configured Internet explorer for users,
that when you place in the address line of IE something like
pbb:some_address
it opens some_address using this application. And now they also wanted to click on such pbb:... link inside the email.
But outlook does not want to recognize it the same way as it recognizes http://...

Well, eventually I figured out how to do it creating corresponding http://...  files
and using them for redirection to "pbb:..." - and writing different address into each
redirection file, and  then it worked, but for couple of days
I thought I'd not be able to resolve this, as I could not find how to configure outlook, so that it could
recognize pbb:... as a link in the same way as http:...


0
objectsCommented:
0
royjaydAuthor Commented:
thanks guys
any help with my next question would be greatly appreciated
http://www.experts-exchange.com/Programming/Languages/Java/Q_26930631.html

thx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.