# HG changeset patch # User Fabian Huch # Date 1704878755 -3600 # Node ID 71fde9e76ca94635b7d45debd9e3405dbb67a747 # Parent 0d7c7fe65638274d9d7bfe3371fad3681031d8c9 proper SMTP session: set envelope sender address correctly; diff -r 0d7c7fe65638 -r 71fde9e76ca9 src/Pure/General/mail.scala --- a/src/Pure/General/mail.scala Tue Jan 09 17:35:56 2024 +0100 +++ b/src/Pure/General/mail.scala Wed Jan 10 10:25:55 2024 +0100 @@ -48,6 +48,7 @@ private def mail_session: JSession = { val props = new JProperties() + props.setProperty("mail.smtp.from", sender.toString) props.setProperty("mail.smtp.host", smtp_host) props.setProperty("mail.smtp.port", smtp_port.toString) props.setProperty("mail.smtp.auth", use_auth.toString) @@ -64,7 +65,7 @@ val authenticator = new Authenticator() { override def getPasswordAuthentication = new PasswordAuthentication(user, password) } - JSession.getDefaultInstance(props, authenticator) + JSession.getInstance(props, authenticator) } def defined: Boolean = smtp_host.nonEmpty