Package com.axelor.mail.service
Interface MailService
-
- All Known Implementing Classes:
MailServiceImpl
public interface MailServiceThe mail service defines interface for sending/reading mails.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfetch()Fetch mails from remote mail server.List<javax.mail.internet.InternetAddress>findEmails(String matching, List<String> selected, int maxResults)Search for email addresses matching the given text.Modelresolve(String email)Resolve the given email address to an associated entity.voidsend(MailMessage message)Send a mail for the givenMailMessage.
-
-
-
Method Detail
-
send
void send(MailMessage message) throws MailException
Send a mail for the givenMailMessage.- Parameters:
message- the message to send- Throws:
MailException- on failure
-
fetch
void fetch() throws MailExceptionFetch mails from remote mail server.- Throws:
MailException- on failure
-
resolve
Model resolve(String email)
Resolve the given email address to an associated entity.Generally, it should resolve to the
User,Contact,PartnerorCustomerthat represents a contact.The default implementation resolves to the
Userrecords.- Parameters:
email- the email address to resolve- Returns:
- associated entity or null if can't be resolved
-
findEmails
List<javax.mail.internet.InternetAddress> findEmails(String matching, List<String> selected, int maxResults)
Search for email addresses matching the given text.- Parameters:
matching- the match textselected- already selected email addressesmaxResults- maximum number of items to return- Returns:
- list of
InternetAddress
-
-