Cleanup smtp code

This commit is contained in:
olblak 2017-06-07 09:12:16 +02:00
parent 4fafa8a2f9
commit 1522f7d062
2 changed files with 4 additions and 3 deletions

View File

@ -490,9 +490,8 @@ public class Application {
private Session createJavaMailSession() {
Session session;
Properties props = new Properties(System.getProperties());
System.out.printf(params.smtpAuth());
props.put("mail.smtp.host",params.smtpServer());
if(params.smtpAuth().equals("true")) {
if(params.smtpAuth()) {
props.put("mail.smtp.auth", params.smtpAuth());
props.put("mail.smtp.starttls.enable", true);
props.put("mail.smtp.port", 587);

View File

@ -1,5 +1,7 @@
package org.jenkinsci.account;
import com.sun.org.apache.xpath.internal.operations.Bool;
import java.util.Date;
/**
@ -26,9 +28,9 @@ public interface Parameters {
* smtpAuth: If true, attempt to authenticate the user using the AUTH command.
* smtpPassword: SMTP password for SMTP server.
*/
Boolean smtpAuth();
String smtpServer();
String smtpUser();
String smtpAuth();
String smtpPassword();
String recaptchaPublicKey();