问题
can Jenkins send mail notify to recipients with attachments? What is more important for me (optional), it could also read from file *.xls and add this to email text.
Or can i add from my system variable to data, which is sending by plugin of jenkins (ext mail) ?
回答1:
New answer, as of September 2011: Yes. Issue 9018 has been resolved.
Starting with version 2.15 of the Jenkins email-ext plugin, you can send attachments in Jenkins build notifications. See the Jenkins wiki here:
- https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
回答2:
This issue was recently posted on the Jenkins JIRA: Issue 9018. That site is not responding for me right now, so I can't even see what the status is.
Regarding the e-mails in the XLS file, I did a search of the Jenkins plug-ins and could not find anything for "XLS" or "Excel". If you're Jenkins instance is running on Windows, you could use VBScript and COM to either export the list to a parsable format like TAB or CVS; or you could try to programmatically look through the list for the e-mails and get the VBScript to return them as one big string. This forum has a pretty clear example of opening a workbook, selecting the appropriate worksheet, and then iterating through the cells: XLS & VBScript. Oh, and I just remembered that if you have newer versions of Visual Studio and Office, there's interoperability there that might be easier; though I've never tried that combo.
I hope this helps,
Zachary
来源:https://stackoverflow.com/questions/6952503/can-jenkins-send-mail-notify-with-attachment