- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 34 of file MailProvider.java.
◆ clearEmpties()
void org.turro.mail.provider.MailProvider.clearEmpties |
( |
| ) |
|
Definition at line 178 of file MailProvider.java.
179 id = Strings.nullIfBlank(
id);
180 hostname = Strings.nullIfBlank(hostname);
181 user = Strings.nullIfBlank(user);
182 password = Strings.nullIfBlank(password);
183 from = from.
isEmpty() ? null : from;
184 if(replies !=
null) replies.removeIf(r -> r.isEmpty());
185 if(ccs !=
null) ccs.removeIf(c -> c.isEmpty());
186 if(bccs !=
null) bccs.removeIf(b -> b.isEmpty());
◆ compareTo()
int org.turro.mail.provider.MailProvider.compareTo |
( |
MailProvider |
o | ) |
|
Definition at line 168 of file MailProvider.java.
169 return Comparison.ascendant().compare(
id, o.id).get();
◆ equals()
boolean org.turro.mail.provider.MailProvider.equals |
( |
Object |
obj | ) |
|
Definition at line 197 of file MailProvider.java.
204 if (getClass() != obj.getClass()) {
207 final MailProvider other = (MailProvider) obj;
208 return Objects.equals(this.
id, other.id);
◆ getBccs()
Set<MailRecipient> org.turro.mail.provider.MailProvider.getBccs |
( |
| ) |
|
◆ getCcs()
Set<MailRecipient> org.turro.mail.provider.MailProvider.getCcs |
( |
| ) |
|
◆ getFrom()
◆ getHostname()
String org.turro.mail.provider.MailProvider.getHostname |
( |
| ) |
|
◆ getId()
String org.turro.mail.provider.MailProvider.getId |
( |
| ) |
|
◆ getPassword()
String org.turro.mail.provider.MailProvider.getPassword |
( |
| ) |
|
◆ getPort()
Integer org.turro.mail.provider.MailProvider.getPort |
( |
| ) |
|
◆ getReplies()
Set<MailRecipient> org.turro.mail.provider.MailProvider.getReplies |
( |
| ) |
|
◆ getUser()
String org.turro.mail.provider.MailProvider.getUser |
( |
| ) |
|
◆ hashCode()
int org.turro.mail.provider.MailProvider.hashCode |
( |
| ) |
|
◆ isEmpty()
boolean org.turro.mail.provider.MailProvider.isEmpty |
( |
| ) |
|
◆ isSsl()
boolean org.turro.mail.provider.MailProvider.isSsl |
( |
| ) |
|
◆ isTls()
boolean org.turro.mail.provider.MailProvider.isTls |
( |
| ) |
|
◆ setBccs()
void org.turro.mail.provider.MailProvider.setBccs |
( |
Set< MailRecipient > |
bccs | ) |
|
◆ setCcs()
void org.turro.mail.provider.MailProvider.setCcs |
( |
Set< MailRecipient > |
ccs | ) |
|
◆ setFrom()
void org.turro.mail.provider.MailProvider.setFrom |
( |
MailRecipient |
from | ) |
|
◆ setHostname()
void org.turro.mail.provider.MailProvider.setHostname |
( |
String |
hostname | ) |
|
◆ setId()
void org.turro.mail.provider.MailProvider.setId |
( |
String |
id | ) |
|
◆ setPassword()
void org.turro.mail.provider.MailProvider.setPassword |
( |
String |
password | ) |
|
◆ setPort()
void org.turro.mail.provider.MailProvider.setPort |
( |
Integer |
port | ) |
|
◆ setReplies()
void org.turro.mail.provider.MailProvider.setReplies |
( |
Set< MailRecipient > |
replies | ) |
|
◆ setSsl()
void org.turro.mail.provider.MailProvider.setSsl |
( |
boolean |
ssl | ) |
|
◆ setTls()
void org.turro.mail.provider.MailProvider.setTls |
( |
boolean |
tls | ) |
|
◆ setupMail()
void org.turro.mail.provider.MailProvider.setupMail |
( |
HtmlEmail |
email | ) |
throws NamingException, EmailException |
Definition at line 136 of file MailProvider.java.
137 if (hostname.startsWith(
"java:")) {
138 email.setMailSessionFromJNDI(hostname);
140 email.setHostName(hostname);
142 if(port !=
null) email.setSmtpPort(port);
144 email.setSSLOnConnect(
true);
145 if(port !=
null) email.setSslSmtpPort(String.valueOf(port));
147 if(tls) email.setStartTLSEnabled(
true);
148 if(!Strings.isBlank(user) && !Strings.isBlank(password)) {
149 email.setAuthentication(user, ElephantContext.decrypt(password));
151 if(email.getFromAddress() ==
null) {
152 email.setFrom(from.
getMail(), from.
getName(), ElephantContext.getEncoding());
154 if(replies !=
null)
for(MailRecipient reply : replies) {
155 email.addReplyTo(reply.getMail(), reply.getName(), ElephantContext.getEncoding());
157 if(ccs !=
null)
for(MailRecipient cc : ccs) {
158 email.addCc(cc.getMail(), cc.getName(), ElephantContext.getEncoding());
160 if(bccs !=
null)
for(MailRecipient bcc : bccs) {
161 email.addCc(bcc.getMail(), bcc.getName(), ElephantContext.getEncoding());
◆ setUser()
void org.turro.mail.provider.MailProvider.setUser |
( |
String |
user | ) |
|
The documentation for this class was generated from the following file: