@Extension public static final class Mailer.DescriptorImpl extends BuildStepDescriptor<Publisher>
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Selfclazz| Constructor and Description |
|---|
DescriptorImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json) |
javax.mail.Session |
createSession()
Creates a JavaMail session.
|
FormValidation |
doAddressCheck(String value) |
FormValidation |
doCheckDefaultSuffix(String value) |
FormValidation |
doCheckSmtpServer(String value) |
FormValidation |
doSendTestMail(String smtpHost,
String adminAddress,
boolean authentication,
String username,
Secret password,
boolean useSsl,
String smtpPort,
String charset,
String sendTestMailTo)
Send an email to the admin address
|
String |
getAdminAddress()
Deprecated.
as of 1.4
Use
JenkinsLocationConfiguration instead |
SMTPAuthentication |
getAuthentication() |
String |
getCharset() |
String |
getDefaultSuffix() |
String |
getDisplayName() |
String |
getReplyToAddress() |
String |
getSmtpAuthPassword()
Deprecated.
as of 1.21
Use
authentication |
Secret |
getSmtpAuthPasswordSecret() |
String |
getSmtpAuthUserName()
Deprecated.
as of 1.21
Use
authentication |
String |
getSmtpHost() |
String |
getSmtpPort() |
String |
getSmtpServer()
Deprecated.
|
String |
getUrl()
Deprecated.
as of 1.4
Use
JenkinsLocationConfiguration instead |
boolean |
getUseSsl() |
boolean |
isApplicable(Class<? extends AbstractProject> jobType) |
Publisher |
newInstance(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject formData) |
void |
setAdminAddress(String adminAddress)
Deprecated.
as of 1.4
Use
JenkinsLocationConfiguration instead |
void |
setAuthentication(SMTPAuthentication authentication) |
void |
setCharset(String charset) |
void |
setDefaultSuffix(String defaultSuffix) |
void |
setHudsonUrl(String hudsonUrl)
Deprecated.
as of 1.4
Use
JenkinsLocationConfiguration instead |
void |
setReplyToAddress(String address) |
void |
setSmtpAuth(String userName,
String password)
Deprecated.
as of 1.21
Use
authentication |
void |
setSmtpHost(String smtpHost) |
void |
setSmtpPort(String smtpPort) |
void |
setUseSsl(boolean useSsl) |
filteraddHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMappublic String getDisplayName()
getDisplayName in class Descriptor<Publisher>public String getDefaultSuffix()
public String getReplyToAddress()
@DataBoundSetter public void setReplyToAddress(String address)
public javax.mail.Session createSession()
public boolean configure(org.kohsuke.stapler.StaplerRequest req,
net.sf.json.JSONObject json)
throws Descriptor.FormException
configure in class Descriptor<Publisher>Descriptor.FormExceptionpublic String getSmtpHost()
@Deprecated public String getSmtpServer()
@Deprecated public String getAdminAddress()
JenkinsLocationConfiguration instead@Deprecated public String getUrl()
JenkinsLocationConfiguration instead@Deprecated public String getSmtpAuthUserName()
authentication@Deprecated public String getSmtpAuthPassword()
authenticationpublic Secret getSmtpAuthPasswordSecret()
public boolean getUseSsl()
public String getSmtpPort()
public String getCharset()
@DataBoundSetter public void setDefaultSuffix(String defaultSuffix)
@Deprecated public void setHudsonUrl(String hudsonUrl)
JenkinsLocationConfiguration insteadhudsonUrl - Jenkins base URL to set@Deprecated public void setAdminAddress(String adminAddress)
JenkinsLocationConfiguration insteadadminAddress - Jenkins administrator mail address to set@DataBoundSetter public void setSmtpHost(String smtpHost)
@DataBoundSetter public void setUseSsl(boolean useSsl)
@DataBoundSetter public void setSmtpPort(String smtpPort)
@DataBoundSetter public void setCharset(String charset)
@DataBoundSetter public void setAuthentication(@CheckForNull SMTPAuthentication authentication)
@CheckForNull public SMTPAuthentication getAuthentication()
@Deprecated public void setSmtpAuth(String userName, String password)
authenticationpublic Publisher newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws Descriptor.FormException
newInstance in class Descriptor<Publisher>Descriptor.FormExceptionpublic FormValidation doAddressCheck(@QueryParameter String value)
public FormValidation doCheckSmtpServer(@QueryParameter String value)
public FormValidation doCheckDefaultSuffix(@QueryParameter String value)
public FormValidation doSendTestMail(@QueryParameter String smtpHost, @QueryParameter String adminAddress, @QueryParameter boolean authentication, @QueryParameter String username, @QueryParameter Secret password, @QueryParameter boolean useSsl, @QueryParameter String smtpPort, @QueryParameter String charset, @QueryParameter String sendTestMailTo) throws IOException
smtpHost - name of the SMTP server to use for mail sendingadminAddress - Jenkins administrator mail addressauthentication - if set to true SMTP is used without authentication (username and password)username - plaintext username for SMTP authenticationpassword - secret password for SMTP authenticationuseSsl - if set to true SSL is usedsmtpPort - port to use for SMTP transfercharset - charset of the underlying MIME-mail messagesendTestMailTo - mail address to send test mail toIOException - in case the active jenkins instance cannot be retrievedpublic boolean isApplicable(Class<? extends AbstractProject> jobType)
isApplicable in class BuildStepDescriptor<Publisher>Copyright © 2016–2019. All rights reserved.