Thursday, 5 September 2013

JAVA:send button in email

JAVA:send button in email

My app send an email from my java code .. I also want to send a link with
in a button which will say "Activate your account"
here is what i have
Message message = new MimeMessage(sessionMail);
message.setFrom(new InternetAddress("test@gmail.com"));
message.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(user.getEmailAddress()));
message.setSubject("Account Created");
message.setText("Dear"+ user.getUserName() +" "
+ "\n\n Your Account created,"
+ "\n\n Please activate your account"
+ "<a> www.test.eu:8080/Project/"+ user.getToken()+" </a>"
);
Transport.send(message);
this line
+ "<a> www.test.eu:8080/Project/"+ user.getToken()+"
is right now beign sent as a link, i just want to put this link in a
button and send that button to user's email ...
is there a solution for this
thanks

No comments:

Post a Comment