I have setup an automation script that is successfully looping through a table of suppliers creating a .pdf file and e-mailing the results to the proper recipients. But it failed to attach the file to 18 of the 20 recipients.
I am getting no true error in the log that I can see, but after the line:
‘Setting up SMTP email’ I am missing the line-> ‘Email attachment’ on the 18 that sent an e-mail with out attachment. The two that did attach the .pdf are randomly placed in the script (not first or last and not one after the other).
I am using a table with supplier number and e-mail address and it is reading through all 89 records and only sending to the 20 that had data this week, but I must be missing something.
I can send my script directly to your inbox.
Please advice, Thank you - Christy
Yes, I would like to have a look. Please run the automation script with Verbose logging. (Set this in the Script description at top of script). Zip up the log file, tas file and all dependant files and I will have a look.
I am assuming that there are not issues when you test this in TDA, it just occurs when scheduled, is that correct? I have heard of someone else having this issue but I have not been able to track down the issue as I cannot reproduce myself. Any additional data you can give me would be great. IE: What version of TDA, is this run on a different pc when scheduled, what is OS logid when scheduled?
Thanks for the files.
I see a couple of issues. There are 16 occurrences where the Email values are not set in the variable. The set variable activity does some parsing and there must be a character in the email string that it is having difficulty with. Variable “EMAIL” set to "#SupTable.EMAIL#"Variable value = Invalid characterI also see that you are appending a date to the sup report but the email attachment does not include this variable. I think if we solve these two issues you will get what you need. Both if these issues I have seen in older builds of TDA so I am assuming you do not have the latest version. Can you install TDA 2.6? This will be a side by side install and you won’t need to uninstall the version you are using. Once you have that installed, make a copy of the script and open in the Automation script editor. Re-attach the reports to the email attachment and make sure you see the date format variable. #yyyy-MM-dd#If you cannot upgrade take off the date suffix and also run your Sup_List in the TDA editor and save the results in a *tef file and send to me. I would have to come up with a work around for the “invalid character” issue. (So it is best to upgrade if you can)