@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 smtpServer,
String adminAddress,
boolean useSmtpAuth,
String smtpAuthUserName,
Secret smtpAuthPasswordSecret,
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 |
String |
getCharset() |
String |
getDefaultSuffix() |
String |
getDisplayName() |
String |
getReplyToAddress() |
String |
getSmtpAuthPassword() |
Secret |
getSmtpAuthPasswordSecret() |
String |
getSmtpAuthUserName() |
String |
getSmtpHost() |
String |
getSmtpPort() |
String |
getSmtpServer() |
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 |
setCharset(String chaset) |
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) |
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()
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 getSmtpServer()
public String getAdminAddress()
JenkinsLocationConfiguration insteadpublic String getUrl()
JenkinsLocationConfiguration insteadpublic String getSmtpAuthUserName()
public String getSmtpAuthPassword()
public Secret getSmtpAuthPasswordSecret()
public boolean getUseSsl()
public String getSmtpPort()
public String getSmtpHost()
public String getCharset()
public void setDefaultSuffix(String defaultSuffix)
public void setHudsonUrl(String hudsonUrl)
JenkinsLocationConfiguration insteadhudsonUrl - Jenkins base URL to setpublic void setAdminAddress(String adminAddress)
JenkinsLocationConfiguration insteadadminAddress - Jenkins administrator mail address to setpublic void setSmtpHost(String smtpHost)
public void setUseSsl(boolean useSsl)
public void setSmtpPort(String smtpPort)
public void setCharset(String chaset)
public 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 smtpServer, @QueryParameter String adminAddress, @QueryParameter boolean useSmtpAuth, @QueryParameter String smtpAuthUserName, @QueryParameter Secret smtpAuthPasswordSecret, @QueryParameter boolean useSsl, @QueryParameter String smtpPort, @QueryParameter String charset, @QueryParameter String sendTestMailTo) throws IOException
smtpServer - name of the SMTP server to use for mail sendingadminAddress - Jenkins administrator mail addressuseSmtpAuth - if set to true SMTP is used without authentication (username and password)smtpAuthUserName - plaintext username for SMTP authenticationsmtpAuthPasswordSecret - plaintext 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.