Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error sending to the following VALID addresses Jenkins

Tags:

jenkins

I will receive emails when I trigger using build now manually, but I don't receive emails when I tried to using it in batch mode. Below is the log I obtain when triggered in batch mode.

Email was triggered for: Always Sending email for trigger: Always Sending email to: [email protected] Error sending to the following VALID addresses: [email protected]

Note: There are no build logs attached while sending email.

like image 524
user7577187 Avatar asked Feb 16 '17 20:02

user7577187


Video Answer


2 Answers

In your Jenkins configuration, make sure that you have entered correct email address for "System Admin e-mail address".

Notification e-mails from Jenkins will be sent with this address in the "from" header.

like image 145
Ajay Avatar answered Sep 19 '22 13:09

Ajay


Error - Not sent to the following valid addresses: <valid_recipient_address> OR Error sending to the following VALID addresses: <valid_recipient_address>

Reason - Email address of sender is not correct.

How to troubleshoot - Enable the debug mode from Jenkins -> Manage Jenkins -> Configure System -> (Search for Extended E-mail Notification configuration -> Check Enable Debug Mode

Example of Working code

emailext attachLog: false, 
  attachmentsPattern: 'example_file.yaml',
  from: '<valid_sender_address>',
  body: 'Test Message',
  subject: 'Test Subject',
  to: '<valid_recipient_address>'
like image 37
i_am_beginner Avatar answered Sep 19 '22 13:09

i_am_beginner