mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-07 19:42:17 +00:00
Never use default instance, always create a new one because it can happen that upon bundle reinstall the session context has changed and the authenticator will deny access because object id will have changed
This commit is contained in:
1 parent
11ba82489c
commit
d6a87b3301
1 file changed
+1
-1
+1
-1
@@ -112,7 +112,7 @@ public class OSGiRestartingPortMonitor extends AbstractPortMonitor {
|
||||
|
||||
private void sendMail(Endpoint endpoint, final String subject, String content) throws MessagingException, AddressException,
|
||||
NoSuchProviderException {
|
||||
Session session = Session.getDefaultInstance(this.properties, new SMTPAuthenticator());
|
||||
Session session = Session.getInstance(this.properties, new SMTPAuthenticator());
|
||||
MimeMessage msg = new MimeMessage(session);
|
||||
msg.setFrom(new InternetAddress("root@sapsailing.com"));
|
||||
msg.setSubject(subject);
|
||||
|
||||
Reference in new issue
Block a user