parent
ad6fb55958
commit
d8bf3a72da
|
|
@ -55,6 +55,11 @@ public class MailProperties {
|
||||||
*/
|
*/
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protocol used by the SMTP server.
|
||||||
|
*/
|
||||||
|
private String protocol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default MimeMessage encoding.
|
* Default MimeMessage encoding.
|
||||||
*/
|
*/
|
||||||
|
|
@ -107,6 +112,14 @@ public class MailProperties {
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getProtocol() {
|
||||||
|
return this.protocol;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProtocol(String protocol) {
|
||||||
|
this.protocol = protocol;
|
||||||
|
}
|
||||||
|
|
||||||
public Charset getDefaultEncoding() {
|
public Charset getDefaultEncoding() {
|
||||||
return this.defaultEncoding;
|
return this.defaultEncoding;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,9 @@ public class MailSenderAutoConfiguration {
|
||||||
}
|
}
|
||||||
sender.setUsername(this.properties.getUsername());
|
sender.setUsername(this.properties.getUsername());
|
||||||
sender.setPassword(this.properties.getPassword());
|
sender.setPassword(this.properties.getPassword());
|
||||||
|
if (this.properties.getProtocol() != null) {
|
||||||
|
sender.setProtocol(this.properties.getProtocol());
|
||||||
|
}
|
||||||
if (this.properties.getDefaultEncoding() != null) {
|
if (this.properties.getDefaultEncoding() != null) {
|
||||||
sender.setDefaultEncoding(this.properties.getDefaultEncoding().name());
|
sender.setDefaultEncoding(this.properties.getDefaultEncoding().name());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue