Unable to email file list

Discuss RoboTask here
Post Reply
Prem
Posts: 35
Joined: Fri Sep 30, 2005 2:01 am
Location: Netherlands

Unable to email file list

Post by Prem »

I keep on getting this error when executing the send mail task, when the {TextFile(c:\file_list.txt)} variable is used as attachment:
E: 24-10-2005 14:58:57: Error occcured: Cannot open file "C:\Documents and Settings\Prem\Desktop\{TextFile(c:\file_list.txt)}". The filename, directory name, or volume label syntax is incorrect
How can i prevent robotask to look on my user desktop? I want it to look in c:\
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to email file list

Post by Oleg »

In this case you should use file name c:\file_list.txt in attachment list.
Variable {TextFile(c:\file_list.txt)} contains the body of file c:\file_list.txt. You should use this variable if you want to include some text from file into message body.
In list of attachments you should use filename (ex. c:\file_list.txt) or variable, which contains file name (ex. {MyFileName})
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to email file list

Post by Oleg »

What written in file c:\file_list.txt? Can you send a few lines from it?
Prem
Posts: 35
Joined: Fri Sep 30, 2005 2:01 am
Location: Netherlands

Unable to email file list

Post by Prem »

Sorry, I'll make myself more clear:
The problem is not inside the file list, robotask's email task just does not recognise {TextFile(c:\file_list.txt)} as a textfile that it has to read and from which it has to attach the files.
It uses {TextFile(c:\file_list.txt)} as if it was a normal file, that is located on my desktop. Why robotask does that, I really dont know.
contents of my file_list.txt:
E:\Data\test.txt
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to email file list

Post by Oleg »

What version are you use? This bug has been fixed in version 2.2.1. I've just tested.
Download latest version here. You can install it over old copy.
Last edited by Oleg on Mon Oct 24, 2005 11:28 am, edited 1 time in total.
Prem
Posts: 35
Joined: Fri Sep 30, 2005 2:01 am
Location: Netherlands

Unable to email file list

Post by Prem »

Thanks, that was true, I was using an old version. I installed the new version, but now i have another problem: I get an error message when I execute a copy/move task of a folder\*.*
An error occurred. Step #0 (Copy/Move File)
This error message happens when the folder is empty (the starting folder, not the destination folder) Therefore, copying cyclic will always give this error message.
This error did not happen in the earlier version Robotask. A new Bug?
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to email file list

Post by Oleg »

May be. Thank for the report. We shall fix this problem in next release.

You can solve the problem so:
1. Simply set up "If error occured" parameter to "Continue execution". (Task editor | Advanced tab)

2. Copy files by using File loop action.

3. Check existence of files. See task below. This is an example for checking existence of files in folder.
It's a good idea to add system variable {FileExistsInFolder(C:\Foldername\*.*)}. I wrote this into our ToDo list

;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|850444931
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task318"
Hide=INTEGER|0
ID=INTEGER|1064594170
Name=STRING|"Test for empty folder"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action10=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FOLDER_IS_EMPTY"" with value ""true"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"FOLDER_IS_EMPTY"
varvalue=STRING|"true"

[Actions\Action10]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Actions\Action2]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20051026"
date2=STRING|"20051026"
destvar=STRING|"C_FILE"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\source\*.*"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""FOLDER_IS_EMPTY"" with value ""false"""
Params=FOLDER

[Actions\Action3\Params]
expand=STRING|"0"
varname=STRING|"FOLDER_IS_EMPTY"
varvalue=STRING|"false"

[Actions\Action4]
ActionID=STRING|"A_LOOP_BREAK"
Enabled=INTEGER|-1
Name=STRING|"Break"

[Actions\Action5]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Actions\Action6]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action6\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"3"
value1=STRING|"{folder_is_empty}"

[Actions\Action7]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Folder is empty"""
Params=FOLDER

[Actions\Action7\Params]
icon=STRING|"3"
msg0=STRING|"Folder is empty"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action8]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action9]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Folder contain files"""
Params=FOLDER

[Actions\Action9\Params]
icon=STRING|"1"
msg0=STRING|"Folder contain files"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
Prem
Posts: 35
Joined: Fri Sep 30, 2005 2:01 am
Location: Netherlands

Unable to email file list

Post by Prem »

Thank you for your FileExistsInFolder task code.
However, I now encounter another problem:
When I execute

create file list c:\file_list.txt
send email with attachments {TextFile(c:\file_list.txt)}
the email is sent with attachments (I see it leaving) but never arrives at the recipients address.
I currently use Microsoft Exchange 2003. I tested if my Exchange 2003 caused the problem, but that's not the case, I did the following test:

In the send email I put testaccount@gmail.com (thats a webmail address for testing purposes) as recipient. result: The email with multiple attachemts is received correctly in Gmail, but if I forward the same message out of Gmail to another address, An error window pops up with the following message:
               Microsoft Internet Explorer
                An internal error occurred. Your message could not be sent.

Sending the email without attachements out of Robotask or out of Gmail is without errors and succesful. 
When I send a normal email out of my email client with the same attachments, all goes without problem.
If I send a new email out of Gmail with the same attachments all goes without problem.
Therefore the cause of the error must be in the attachments that are generated from the {TextFile(c:\file_list.txt)} variable. Maybe there is a coding error that adds something to the attachments name or properties, which is rejected by email clients.
Please perform similare test and reply with your comments, thank you.
 
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Unable to email file list

Post by Oleg »

I've just tested. No problems. The message was sent and delivered without problem with text and attachments.

If your task was executed without errors then the problem is in your SMTP. It may be firewall, virus checker or some other services. Probably your SMTP can accept messages only from Outlook.
Post Reply