Cleanup smtp code
This commit is contained in:
parent
4fafa8a2f9
commit
1522f7d062
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue