Hi Jyo, If you install Email-ext plugin <https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin> you'll have this section available when adding an *Editable Email Notification* in a job (*Advanced settings*):
*Pre-send Script* *This script will be run prior to sending the email to allow modifying the email before sending. The MimeMessage variable is "msg," the build is also available as "build" and a logger is available as "logger." You may also cancel sending the email by setting the boolean variable "cancel" to true. * I hope be useful. Best regards, Rachel On Friday, December 9, 2016 at 6:25:14 PM UTC+1, [email protected] wrote: > > Hello Friends, > > I am new to Jenkins and configuring a job to run my automated selenium > tests and have a need to send the email based on my build result and > attachments. > > > Current Scenario - After my test run , i am attaching an .xml file and > screenshots to the email notification. > > > Content Type : Default Content Type > Default Subject : Smoke Test build results > Default Content : Attached is the html report for smoke tests and screen > shots of failed tests. > > Attachments:xxxx/target/surefire-reports/emailable-report.html,xxxxxt/target/surefire-reports/screenshots/*.png > > > My requirements : > > 1. If there is attachment and no screen shots , i need default content to > be and only attachment location. > > Default Content : Attached is the html report for smoke tests > > Attachments:xxxx/target/surefire-reports/emailable-report.html,xxxxxt/target/surefire-reports/screenshots/*.png111 > > > 2. If there is no attachement and screenshots , default content should be > > Default Content : Configuration issues , attachment missing. > > > > > Any help is appreciated. > > Thanks > Jyo > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9899d2ce-75af-4f21-8c6b-9ed7c0a1b5d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
