I think the issue is that you have an old Universal Email and a new one one on the page. And only the first one is sending an email and only the second one has an attachment.
Delete lines 27-38 to remove the old email and I think the new one will send the attachment.