November 9, 201312 yr I'm stumped by what would seem to be a simple problem. I have a script that has been sending composed e-mail successfully for months now. The e-mail send script gathers up the To Addresses, Header, and Body text, then sends the e-mail. Works fine. Now I've added the ability to include an attachment. The same script, with the attachment command (EmailAttachFile) added, works fine, except that the body text no longer is included in the e-mail -- just the attachment. If there is no attachment, the e-mail sends with the body text included. It seems I can't have both. I test for error condition after every Email command, and there are no errors thrown. I also have stepped through the script multiple times using Script Debugger, but don't see any issues. I'm using the following Email commands, in sequence: EmailConnectSMTP EmailCreate EmailSetHeader EmailAttachFile EmailSetBody EmailSend EmailDisconnect (Note: I've also tried reversing the order the EmailAttachFile and EmailSetBody commands, just in case that would help. No joy.) Any ideas?
November 9, 201312 yr Author Duh. I'll answer my own question. The issue wasn't with the attachments -- it was with the body text. I had been using type "rtf" -- which doesn't support both text and attachments. Once I switched to type=html, I can now get both attachments and body text in the same message. Thanks -- and sorry to bother the community. Perhaps my stupidity will help someone else searching for a similar question.
Create an account or sign in to comment