Anshu Bhattarai
Anshu Bhattarai

Reputation: 73

Link not working in yahoo mail

While sending email from java to Yahoo mail , the link inside is not working. URL not clickable in Yahoo while it's fine in Gmail.

Here's code to send the mail:

MimeMessage mime = this.mailSender.createMimeMessage();
MimeMessageHelper message = new MimeMessageHelper(mime, true);
message.setTo(to);
message.setSubject(subject);
message.setText("verification link: http://localhost:8080/myproject/verification.zulverId=6c1", true);
this.mailSender.send(mime);

Upvotes: 2

Views: 1375

Answers (1)

saravanakumar
saravanakumar

Reputation: 1777

use

    message.setContent("verification link: http://localhost:8080/myproject/verification.zulverId=6c1", "text/html; charset=utf-8");
    message.saveChanges();

setText internally calls setContent method.So use it directly.

Upvotes: 1

Related Questions