use*_*339 3 java email outlook
我使用的是Spring MimeMessageHelper和JavaMailSender.发送电子邮件,电子邮件客户端(Outlook)时,是否可以仅显示邮件发件人姓名而不显示地址.
谢谢!
MimeMessageHelper message = new MimeMessageHelper(mimeMessage, true, "UTF-8");
// you can either do it this way with a regular string
message.setFrom("John Smith <john@example.com>");
// or this way with an InternetAddress
message.setFrom(new InternetAddress("john@example.com", "John Smith"));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2923 次 |
| 最近记录: |