SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Emailing Attachments

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Emailing Attachments
Author Message
shawn29316



Joined: 27 Dec 2007
Posts: 27
Country: United States

Post Emailing Attachments Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
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 View user's profile Send private message
shawn29316



Joined: 27 Dec 2007
Posts: 27
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
"\\", "\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 View user's profile Send private message
shawn29316



Joined: 27 Dec 2007
Posts: 27
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
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 View user's profile Send private message
shawn29316



Joined: 27 Dec 2007
Posts: 27
Country: United States

Post Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
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 View user's profile Send private message
shawn29316



Joined: 27 Dec 2007
Posts: 27
Country: United States

Post Reply with quote
That worked. Thanks!
Mon Aug 04, 2008 6:54 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.