fixing attachment issue

This pull request fixes the email attachment issue.