Package hudson.tasks

Class Mailer.DescriptorImpl

    • Constructor Detail

      • DescriptorImpl

        public DescriptorImpl()
    • Method Detail

      • getDefaultSuffix

        public String getDefaultSuffix()
      • getReplyToAddress

        public String getReplyToAddress()
      • setReplyToAddress

        @DataBoundSetter
        public void setReplyToAddress​(String address)
      • createSession

        public jakarta.mail.Session createSession()
        Creates a JavaMail session.
        Returns:
        mail session based on the underlying session parameters.
      • getSmtpHost

        public String getSmtpHost()
      • getSmtpAuthPasswordSecret

        public Secret getSmtpAuthPasswordSecret()
      • getUseSsl

        public boolean getUseSsl()
      • getUseTls

        public boolean getUseTls()
      • getSmtpPort

        public String getSmtpPort()
      • getCharset

        public String getCharset()
      • setDefaultSuffix

        @DataBoundSetter
        public void setDefaultSuffix​(String defaultSuffix)
      • setSmtpHost

        @DataBoundSetter
        public void setSmtpHost​(String smtpHost)
      • setUseSsl

        @DataBoundSetter
        public void setUseSsl​(boolean useSsl)
      • setUseTls

        @DataBoundSetter
        public void setUseTls​(boolean useTls)
      • setSmtpPort

        @DataBoundSetter
        public void setSmtpPort​(String smtpPort)
      • setCharset

        @DataBoundSetter
        public void setCharset​(String charset)
      • setAuthentication

        @DataBoundSetter
        public void setAuthentication​(@CheckForNull
                                      SMTPAuthentication authentication)
      • doCheckDefaultSuffix

        public FormValidation doCheckDefaultSuffix​(@QueryParameter
                                                   String value)
      • doSendTestMail

        public FormValidation doSendTestMail​(@QueryParameter
                                             String smtpHost,
                                             @QueryParameter
                                             String adminAddress,
                                             @QueryParameter
                                             boolean authentication,
                                             @QueryParameter
                                             String username,
                                             @QueryParameter
                                             Secret password,
                                             @QueryParameter
                                             boolean useSsl,
                                             @QueryParameter
                                             boolean useTls,
                                             @QueryParameter
                                             String smtpPort,
                                             @QueryParameter
                                             String charset,
                                             @QueryParameter
                                             String sendTestMailTo)
                                      throws IOException
        Send an email to the admin address
        Parameters:
        smtpHost - name of the SMTP server to use for mail sending
        adminAddress - Jenkins administrator mail address
        authentication - if set to true SMTP is used without authentication (username and password)
        username - plaintext username for SMTP authentication
        password - secret password for SMTP authentication
        useSsl - if set to true SSL is used
        useTls - if set to true TLS is used
        smtpPort - port to use for SMTP transfer
        charset - charset of the underlying MIME-mail message
        sendTestMailTo - mail address to send test mail to
        Returns:
        response with http status code depending on the result of the mail sending
        Throws:
        IOException - in case the active jenkins instance cannot be retrieved
      • doCheckAuthentication

        public FormValidation doCheckAuthentication​(@QueryParameter
                                                    boolean authentication,
                                                    @QueryParameter
                                                    boolean useSsl,
                                                    @QueryParameter
                                                    boolean useTls)