Skip to content
Advertisement

How to send hyperlink in message body using javamail API in my app?

I need to send verification email to the user in my application and in that mail i want to send an url as a hyperlink, i am able to send email successfully but i am not getting how to send hyperlink in the body text.

My code where i am sending email to user :-

JavaScript

This one is my Mail.class :-

JavaScript

Please guide me how to send text and hyperlink in the message body of the email which i am sending in the background.

Advertisement

Answer

Make sure you’re using the official JavaMail for Android.

Then, fix these common JavaMail mistakes.

To send a clickable link, send HTML email. Set _body with a string that includes the html content you want in the message. Change the code that sets the message body to:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement