Updated simple-java-mail

This commit is contained in:
neviyn 2020-03-09 13:35:39 +00:00
parent aba1b91eec
commit 216e5f2e82
3 changed files with 6 additions and 5 deletions

View File

@ -122,7 +122,7 @@
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>5.2.0</version>
<version>6.0.3</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>

View File

@ -1,8 +1,9 @@
package uk.co.neviyn.observationdatabase
import org.joda.time.DateTime
import org.simplejavamail.api.mailer.Mailer
import org.simplejavamail.api.mailer.config.TransportStrategy
import org.simplejavamail.email.EmailBuilder
import org.simplejavamail.mailer.Mailer
import org.simplejavamail.mailer.MailerBuilder
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@ -47,5 +48,5 @@ class Email {
private fun createMailer(): Mailer = MailerBuilder.withSMTPServer(environment.getProperty("smtp.host"),
environment.getProperty("smtp.port")!!.toInt(), environment.getProperty("smtp.username"),
environment.getProperty("smtp.password")).buildMailer()
environment.getProperty("smtp.password")).withTransportStrategy(TransportStrategy.SMTP_TLS).buildMailer()
}