Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
パスワードのリセットをクリックしたので、受信者にメールを送りたいのですが。メールは正しく送信されていますが、送信元アドレスはmyname @ SystemNameのようなものです。送信元アドレスを設定するにはどうすればよいですか?
setFrom()メソッドを使用します。
Session mailSession = Session.getInstance(props, null); MimeMessage message = new MimeMessage(mailSession); message.setFrom(new InternetAddress("sendingaddress@company.com"));
JavaDocリファレンス