It appears that the email-resource
doesn't have the option for attachments. Even if it did, I'm not sure how you could get the logs from the job/task. The log would probably have to be a task output. Seems complicated.
Easiest thing to do is just linking to the build in your email, like in the example in the README
- put: send-an-email
params:
subject_text: "Build finished: ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME}"
body_text: "Build finished: ${ATC_EXTERNAL_URL}/teams/main/pipelines/${BUILD_PIPELINE_NAME}/jobs/${BUILD_JOB_NAME}/builds/${BUILD_NAME}"
Sorry my answer isn't better. Hope this helps!