我的应用程序从我的Java代码发送电子邮件。 我也想一个按钮,将显示“激活帐户”内发送一个链接
这里是我有:
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\nPlease activate your account"
+ "<a> www.test.eu:8080/Project/"
+ user.getToken()+"</a>");
Transport.send(message);
下面的行
+ "<a> www.test.eu:8080/Project/"+ user.getToken()+"
现在工作为纽带,我只想把这个链接在一个按钮,发送按钮,用户的电子邮件。
对此有任何解决方案?
我试图此
message.setText("Dear"+ user.getUserName() +" "
+ "\n\n Your Tie Account created,"
+ "\n\n Please activate your account"
+ " <a href=www.example.eu:8080/TieProject/#!"+ user.getToken()+" >"
+" <button>Activate your Account</button> </a>"
);
谢谢