 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
shawn29316
Joined: 27 Dec 2007 Posts: 27 Country: United States |
|
Emailing Attachments |
|
Hi,
I've been able to email 1 attachment but cannot attach a second file. Here's what I've done:
MailSendWithAttachment( "email account", "password", "send to email account", "subject", "message", "m:\\my_24X7_Job_Database\\Perc_Oper_CBMs_On_Time.xls, m:\my_24X7_Database\Half_Thru.xls" )
With this I get an error saying the second file doesn't exist. When I change the file part of the statement to:
"m:\\my_24X7_Job_Database\\Perc_Oper_CBMs_On_Time.xls", "m:\my_24X7_Database\Half_Thru.xls" )
I get an error saying "Bad number of arguments.
From reading the help file, it seems the first option is right but it doesn't work.
Any ideas?
Thanks,
-Shawn
|
|
Fri Aug 01, 2008 3:59 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Why are you using escape symbols only in the first file, but not in the second?
Are these the actual file names, or you modified them in the post?
|
|
Fri Aug 01, 2008 4:09 pm |
|
 |
shawn29316
Joined: 27 Dec 2007 Posts: 27 Country: United States |
|
|
|
I'm sorry but I don't know what escape symbols are.
These are actual the file names.
|
|
Fri Aug 01, 2008 4:13 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
"\\", "\n", "t", "\r", etc... for details please see "Special ASCII symbols" topic in the online help. If you modified file names before posting the script, that probably explains why the script doesn't work. If the script was not modified, then it must be something else. In any case, try sending it email using just the second file alone and see if that works. If you get the same error, the file name must be invalid.
|
|
Fri Aug 01, 2008 4:19 pm |
|
 |
shawn29316
Joined: 27 Dec 2007 Posts: 27 Country: United States |
|
|
|
I've gone back and replaced the \\ with\. I created 3 lines that use the following file info:
"m:\my_24X7_Job_Database\Perc_Oper_CBMs_On_Time.xls")
"m:\my_24X7_Job_Database\Half_Thru.xls")
"m:\my_24X7_Job_Database\Perc_Oper_CBMs_On_Time.xls, m:\my_24X7_Job_Database\Half_Thru.xls")
The first 2 ran fine but the when I tried to send both files with 1 email, it gave me an error saying the second file didn't exist.
Then I swapped the names of the files in the last statement to read:
"m:\my_24X7_Job_Database\Half_Thru.xls, m:\my_24X7_Job_Database\Perc_Oper_CBMs_On_Time.xls")
and received the same results.
Any ideas?
|
|
Fri Aug 01, 2008 4:47 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Let's try it a little different. What do yuo get for
MailSendWithAttachment( "email account", "password", "send to email account", "subject", "message", "m:\my_24X7_Database\Half_Thru.xls" )
Does that work or you get the same "file doesn't exist" error?
|
|
Fri Aug 01, 2008 5:10 pm |
|
 |
shawn29316
Joined: 27 Dec 2007 Posts: 27 Country: United States |
|
|
|
That statement works and I receive the email and attachment. Either file that I send by itself works fine.
But regardless of which order I list the files in when I try to send both attachments, I get an error message saying the second file in the list does not exist.
If I attach
"File1" - no problem
"File2" - no problem
"File1, File2" - error saying File2 doesn't exist
"File2, File1" - error saying File1 doesn't exist
|
|
Fri Aug 01, 2008 5:18 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7949
|
|
|
|
Looking at the last port, it seems to me you entering extra space around comma in the file list value. Am I right?
If that is the case, don't enter spaces, enter it like "file1,file2"
|
|
Fri Aug 01, 2008 5:54 pm |
|
 |
shawn29316
Joined: 27 Dec 2007 Posts: 27 Country: United States |
|
|
|
That worked. Thanks!
|
|
Mon Aug 04, 2008 6:54 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|