Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70140

[workflow-basic-steps] The "mail" component is not working well

XMLWordPrintable

      Jenkins version: Jenkins 2.361.1.
      The "mail" component seems to be working abnormally.
      Demo code(Need to change the "to" value):

      node("master"){
          stage("Send email"){
              mail subject: "Subject info",
              to: "xxx@yyy.com,",
              body: "mailContentxx"
          }
      }
      

      The above code gives me this exception:

      java.lang.NoSuchMethodError: 'jenkins.plugins.mailer.tasks.MimeMessageBuilder jenkins.plugins.mailer.tasks.MimeMessageBuilder.addRecipients(java.lang.String, javax.mail.Message$RecipientType)'
      	at org.jenkinsci.plugins.workflow.steps.MailStep$MailStepExecution.buildMimeMessage(MailStep.java:166)
      	at org.jenkinsci.plugins.workflow.steps.MailStep$MailStepExecution.run(MailStep.java:141)
      	at org.jenkinsci.plugins.workflow.steps.MailStep$MailStepExecution.run(MailStep.java:128)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      Finished: FAILURE
      

            Unassigned Unassigned
            madhatter Hatter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: