@NotThreadSafe public class IndirectImmediateSender extends Object implements ImmediateSender
If a smart host name resolves to more than one IP addresses, than only the first one is used.
Instead of specifying a single smarthost, an Upstream with more servers can also be supplied and Mireka will distribute outgoing mails like a simple load balancer.
| Constructor and Description |
|---|
IndirectImmediateSender() |
| Modifier and Type | Method and Description |
|---|---|
MailToHostTransmitter |
getMailToHostTransmitter() |
Upstream |
getUpstream() |
void |
send(Mail mail)
Transmits mail to a smart host.
|
void |
setBackendServer(BackendServer server)
Sets the upstream to the supplied single server.
|
void |
setMailToHostTransmitter(MailToHostTransmitter mailToHostTransmitter) |
void |
setUpstream(Upstream upstream) |
boolean |
singleDomainOnly()
Returns true if the created
ImmediateSender requires that all
recipients of the mail to be sent have the same remote-part. |
public boolean singleDomainOnly()
ImmediateSenderImmediateSender requires that all
recipients of the mail to be sent have the same remote-part.singleDomainOnly in interface ImmediateSenderpublic void send(Mail mail) throws SendException, RecipientsWereRejectedException, IllegalArgumentException, PostponeException
send in interface ImmediateSenderPostponeException - if transmission to all of the hosts must be postponed,
because all of them are assumed to be busy at this moment.IllegalArgumentException - if the domains of the recipients are not the same, or if the
recipient is the special global postmaster address, which has
no absolute domain.SendExceptionRecipientsWereRejectedExceptionpublic MailToHostTransmitter getMailToHostTransmitter()
public void setMailToHostTransmitter(MailToHostTransmitter mailToHostTransmitter)
public void setBackendServer(BackendServer server)
public Upstream getUpstream()
public void setUpstream(Upstream upstream)