@Extension
public static final class Mailer.DescriptorImpl
extends hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
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.
|
hudson.util.FormValidation |
doAddressCheck(String value) |
hudson.util.FormValidation |
doCheckDefaultSuffix(String value) |
hudson.util.FormValidation |
doCheckSmtpServer(String value) |
hudson.util.FormValidation |
doSendTestMail(String smtpHost,
String adminAddress,
boolean authentication,
String username,
hudson.util.Secret password,
boolean useSsl,
boolean useTls,
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() |
static hudson.security.Permission |
getJenkinsManageOrAdmin() |
String |
getReplyToAddress() |
hudson.security.Permission |
getRequiredGlobalConfigPagePermission() |
String |
getSmtpAuthPassword()
Deprecated.
as of 1.21
Use
authentication |
hudson.util.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 |
getUseTls() |
boolean |
isApplicable(Class<? extends hudson.model.AbstractProject> jobType) |
hudson.tasks.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) |
void |
setUseTls(boolean useTls) |
addHelpFileRedirect, 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, toMap
@NonNull public hudson.security.Permission getRequiredGlobalConfigPagePermission()
public static hudson.security.Permission getJenkinsManageOrAdmin()
public String getDisplayName()
getDisplayName
in class hudson.model.Descriptor<hudson.tasks.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 hudson.model.Descriptor.FormException
configure
in class hudson.model.Descriptor<hudson.tasks.Publisher>
hudson.model.Descriptor.FormException
public 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()
authentication
public hudson.util.Secret getSmtpAuthPasswordSecret()
public boolean getUseSsl()
public boolean getUseTls()
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 setUseTls(boolean useTls)
@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)
authentication
public hudson.tasks.Publisher newInstance(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject formData) throws hudson.model.Descriptor.FormException
newInstance
in class hudson.model.Descriptor<hudson.tasks.Publisher>
hudson.model.Descriptor.FormException
public hudson.util.FormValidation doAddressCheck(@QueryParameter String value)
public hudson.util.FormValidation doCheckSmtpServer(@QueryParameter String value)
public hudson.util.FormValidation doCheckDefaultSuffix(@QueryParameter String value)
public hudson.util.FormValidation doSendTestMail(@QueryParameter String smtpHost, @QueryParameter String adminAddress, @QueryParameter boolean authentication, @QueryParameter String username, @QueryParameter hudson.util.Secret password, @QueryParameter boolean useSsl, @QueryParameter boolean useTls, @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 useduseTls
- if set to true
TLS 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 hudson.model.AbstractProject> jobType)
isApplicable
in class hudson.tasks.BuildStepDescriptor<hudson.tasks.Publisher>
Copyright © 2016–2020. All rights reserved.