37 lines
781 B
Java
37 lines
781 B
Java
package de.ph87.tools.email;
|
|
|
|
import lombok.Data;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import java.util.Properties;
|
|
|
|
@Data
|
|
@Component
|
|
@ConfigurationProperties(prefix = "de.ph87.tools.email")
|
|
public class EmailConfig {
|
|
|
|
private String host;
|
|
|
|
private int port = 465;
|
|
|
|
private boolean ssl = true;
|
|
|
|
private String username;
|
|
|
|
private String password;
|
|
|
|
private String from;
|
|
|
|
private String hrefBase = "http://localhost:4200";
|
|
|
|
public Properties getProperties() {
|
|
final Properties properties = new Properties();
|
|
properties.put("mail.smtp.host", host);
|
|
properties.put("mail.smtp.port", port);
|
|
properties.put("mail.smtp.ssl.enable", ssl);
|
|
return properties;
|
|
}
|
|
|
|
}
|