Sending multiple files attached to email

Discuss RoboTask here
Post Reply
Brendan
Posts: 17
Joined: Wed Jun 30, 2004 2:39 pm

Sending multiple files attached to email

Post by Brendan »

Ok, in RT2.1 we can use variables as email attachments, which is great.  But wildcards don't seem yet to be an option.  So, for example, if I need to send c:\DOCUMENTS\*.doc as an email attachment, without predetermining the number of files or the file names, does anyone know how I can do this?
What I've tried:
Using a file loop, increment variable, and a string of if statements to write each file name to a variable.  Then listing every variable as an attachment.  The problem is that I have to create as many variables as I ever intend to use... but when I don't use ALL of them, the Send Email fuction can't find the the files that don't exist and fails out.
Using a file loop to create a "File list" txt file and using that file as a variable.  The problem is that every time I append the file I get a new line, and when I try to use that text as a variable, I get ONLY the first line.
I thought of fixing this by opening the file list and sending <end><delete><,> fifty odd times to get the whole file list into the variable, but the attachment list cannot be seperated by commas, or, as far as I can tell ANYTHING except a line break... which is the ONE THING a variable value cannot seem to contain.
So I'm at wit's end.  It looks like I'm going to have to wait for RT2.X to either allow variables to contain multiple lines of text, or for the Email attachment list to use wildcards (please, please, please...) or at least for the mail list to allow for multiple attachments on a single line separated by some character.... or even just an option for "If attachement not found, send anyway?"
But, does anyone have any suggestions for a workaround?  Even if it takes a task with two thousand functions in it, I'd be willing to try it.  Literally.  Anything...?
Thanks!
-Brendan
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

Sending multiple files attached to email

Post by lonnie16 »

How about using winzip ( or better yet, the wzcline, the command line version of winzip ) .  Zip all the doc's into one file.  Don't some email systems 'reject' doc files ?
Post Reply