Package org.appng.mail
Interface MailTransport
-
- All Known Implementing Classes:
DefaultTransport
public interface MailTransport
SPI for sending e-mails.- Author:
- Matthias Müller
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Mail
createMail()
Creates and returns a newMail
.String
getMailAsString(Mail mail)
boolean
isDisableSend()
Checks whether thisMailTransport
is disabled.void
send(Mail mail)
Send the givenMail
.void
setDisableSend(boolean disableSend)
Enable/disable sending for thisMailTransport
.
-
-
-
Method Detail
-
send
void send(Mail mail) throws MailException
Send the givenMail
.- Parameters:
mail
- theMail
to send- Throws:
MailException
- if an error occurs while sending theMail
-
isDisableSend
boolean isDisableSend()
Checks whether thisMailTransport
is disabled.- Returns:
true
if thisMailTransport
is disabled,false
otherwise.
-
setDisableSend
void setDisableSend(boolean disableSend)
Enable/disable sending for thisMailTransport
. If set totrue
,Mail
s will be logged instead of being send.- Parameters:
disableSend
-
-
-