mdomke / concourse-email-resource

A simple email resource for concourse CI
MIT License
3 stars 13 forks source link

add suport to wildcard in attachments and multiple mime types #16

Closed romerojunior closed 6 years ago

romerojunior commented 6 years ago

🍭 This contribution adds support to attachment wildcards (as seen in resources like artifactory-resource), example:

      - put: send-mail-notification
        params:
          to:
            - eric.cartman@foobar.com
            - stan.marsh@foobar.com
            - butters.stotch@foobar.com
          subject: mail/subject.txt
          body: mail/body.txt
          attachments:
            - build_results/build-id-*.tar.gz

I know... I know... who on earth sends build results via e-mail?

Anyway, you get the point. This is particularly useful for files with versions (or whatever kind of dynamic tag) in its filename.

PS: There is also a small fix for the attachment filenames seen in the recipient mailbox.

romerojunior commented 6 years ago

🍭 Also included some bits to add support to multiple mime types, since I've had some issues attaching compressed files and images. There are no automated tests here, and since I'm running short on time I had to do some manual test cases, all seems good.

mdomke commented 6 years ago

Thank you for your PR!