Attachment functionality in get_templated_mail