public class SmtpEmailSender extends java.lang.Object implements EmailSender
Modifier and Type | Class and Description |
---|---|
static class |
SmtpEmailSender.Encryption |
static class |
SmtpEmailSender.Module |
Modifier and Type | Method and Description |
---|---|
boolean |
canEmail(java.lang.String address)
Can the address receive messages from us?
|
boolean |
isEnabled() |
void |
send(Address from,
java.util.Collection<Address> rcpt,
java.util.Map<java.lang.String,EmailHeader> callerHeaders,
java.lang.String body)
Sends an email message.
|
public boolean isEnabled()
isEnabled
in interface EmailSender
public boolean canEmail(java.lang.String address)
EmailSender
canEmail
in interface EmailSender
address
- the address to consider.public void send(Address from, java.util.Collection<Address> rcpt, java.util.Map<java.lang.String,EmailHeader> callerHeaders, java.lang.String body) throws com.google.gerrit.common.errors.EmailException
EmailSender
send
in interface EmailSender
from
- who the message is from.rcpt
- one or more address where the message will be delivered to.
This list overrides any To or CC headers in headers
.callerHeaders
- message headers.body
- text to appear in the body of the message.com.google.gerrit.common.errors.EmailException
- the message cannot be sent.