I have an application thats can send mails, implemented in Java. I want to put a HTML link inside de mail, but the link appears as normal letters, not as HTML link... How can i
Adding the link is as simple as adding the text
inside the string. You should set your email to support html (it depends on the library you are using), and you should not escape your email content before sending it.
Update: since you are using java.mail
, you should set the text this way:
message.setText(body, "UTF-8", "html");
html
is the mime subtype (this will result in text/html
). The default value that is used by the setText(string)
method is plain