public class SmtpEmailSender extends Object implements EmailSender
Modifier and Type | Class and Description |
---|---|
static class |
SmtpEmailSender.Encryption |
static class |
SmtpEmailSender.Module |
public boolean isEnabled()
isEnabled
in interface EmailSender
public boolean canEmail(String address)
EmailSender
canEmail
in interface EmailSender
address
- the address to consider.public void send(Address from, Collection<Address> rcpt, Map<String,EmailHeader> callerHeaders, 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.