Pages: 1
RSS
A difficult task - Automatic email generation
 
Hi, today I got a "wonderful" task from my boss... to make Bat automatically create a letter, attach a file to it and send it!


This shouldn't be difficult, but he wants this task to be repeated daily, but the name of the attached file is constantly changing, and the Bat can do is to pick it up the file name from an external database... is there any way to do this? The first half of the task can be done with the Scheduler for sure, but this changing file attachment? I'm not so sure...
 
Ok, I've been looking at the Scheduler and I see that there is a "Watch and send files" which might solve this problem, but the next problem here is that you can only watch files by file mask and there is no way to get the filename fr om an external database's exact field....AND if i have 200 individual e-mail address wh ere i want to send a message with different file names than i must define 200 tasks with different file masks
 
I don't know whether this is possible from within TB..

Consider, however, that TB can also be used from the command line, so you can write an external script in your favorite scripting language and use TB with various command line options to create and send the e-mails. The command line options are documented here: https://www.ritlabs.com/en/support/help/77/#6680
 
Quote
Peter V wrote:

This shouldn't be difficult, but he wants this task to be repeated daily, but the name of the attached file is constantly changing, and the Bat can do is to pick it up the file name from an external database... is there any way to do this? The first half of the task can be done with the Scheduler for sure, but this changing file attachment? I'm not so sure...
I have a few questions:

1. Should the same file be sent to each of the 200 recipients on a given day?

2. Do the filenames have any regularity (e.g. repeated phrases)?

3. Can an external database save the filename in a text file?

4. Is the recipient set the same every day?

I think the problem can be solved by using a mail merge with an appropriate template, but first I need to know the answers to the above questions.
Pages: 1