I am building a pipeline in jenkins. Where an email is always sent as a post action I set up smtp in aws using SES and installed email extension plugin in jenkins, I configured the email extension plugin using smtp server details. My SES is in sandbox mode so both the sender and the recipient need to be verified which ihave done. i am using same email id as sender and receiver. In jenkins I configured this email as sender using 'System Admin e-mail address' setting and successfully sent the test email. I keep getting error in pipeline.
I used below post block
always {
mail bcc: '', body: "<br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "${currentBuild.result} CI: Project name -> ${env.JOB_NAME}", to: "myemail0@gmail.com";
}
I keep geting below error
com.sun.mail.smtp.SMTPSendFailedException: 554 Message rejected: Email address is not verified. The following identities failed the check in region AP-SOUTH-1: jenkins@ip-xxxx-xxxx-xxxx-xxxx.ap-south-1.compute.internal
I dont know where this "jenkins@ip-xxxx-xxxx-xxxx-xxxx.ap-south-1.compute.internal" is coming as a sender in the post action but works fine in test configuration.
I inspected the file: hudson.plugins.emailext.ExtendedEmailPublisher.xml located at /var/lib/jenkins but wasnt of much help.
I tried reinstalling the email extension plugin as well many solutions refrenced in stackoverflow like
https://stackoverflow.com/questions/37528301/email-address-is-not-verified-aws-ses https://stackoverflow.com/questions/49125878/using-aws-ses-smtp-error-554-message-rejected-email-address-is-not-verified-t
Would appreciate the kind assistance.