use of com.axelor.mail.MailAccount in project axelor-open-suite by axelor.
the class MailServiceMessageImpl method getMailReader.
private MailReader getMailReader(EmailAccount emailAccount) {
if (readerAccount == null || !readerAccount.getId().equals(emailAccount.getId()) || !readerAccount.getVersion().equals(emailAccount.getVersion())) {
readerAccount = emailAccount;
reader = null;
}
if (reader == null) {
MailAccount mailAccount = mailAccountService.getMailAccount(emailAccount);
reader = new MailReader(mailAccount);
}
return reader;
}
use of com.axelor.mail.MailAccount in project axelor-open-suite by axelor.
the class MailServiceMessageImpl method getMailSender.
protected MailSender getMailSender(EmailAccount emailAccount) {
if (senderAccount == null || !senderAccount.getId().equals(emailAccount.getId()) || !senderAccount.getVersion().equals(emailAccount.getVersion())) {
senderAccount = emailAccount;
sender = null;
}
if (sender == null) {
MailAccount mailAccount = mailAccountService.getMailAccount(emailAccount);
sender = new MailSender(mailAccount);
}
return sender;
}
Aggregations