Email-ext plugin and default suffix

Hi, I want to send an email to the Requestor of the job. So in my jenkinsfile I have:

post {
    success {
        script { emailext (subject: "${env.JOB_NAME}: Build #${env.BUILD_NUMBER} - Successful!",
                            body: '${DEFAULT_CONTENT}',
                            recipientProviders: [requestor()],
                            to: 'jbloggs'
                            )
        }

I have a default email suffix of:

mysuffix.com

The console output is:

Sending email to: joe.bloggs joe.bloggs@mysuffix.com

So it seems that ‘to:’ is using the default suffix, but ‘recipientProviders’ is not.

(We manage users using AD.)

Does that make any sense?

The net result is that requestor()'s email is not delivered.

Hi,

What about:

post {
    success {
        script {
            emailext (
                subject: "${env.JOB_NAME}: Build #${env.BUILD_NUMBER} - Successful!",
                body: '${DEFAULT_CONTENT}',
                recipientProviders: [[$class: 'RequesterRecipientProvider']],
                to: env.CHANGE_AUTHOR_EMAIL
            )
        }
    }
}

?