WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
Using the detected file as the body of an email (Read 4345 times)
YorkieBar
YaBB Newbies
*
Offline



Posts: 18
Using the detected file as the body of an email
Nov 24th, 2010 at 11:34am
 
I'm testing out the function @@@%WD_FILE%@@@ which I understand will use the contents of the detected file as the body of the email message.
I'm getting an error of "The file test.csv can not be read!"

I am using an external email.txt file to address the emails with the @@!email.txt option.
Normally when the body text in @@!email.txt is empty the body text comes from the email Plugin itself. It's here that I entered @@@%WD_FILE%@@@.

Are there any restrictions on this function?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Using the detected file as the body of an emai
Reply #1 - Nov 25th, 2010 at 7:53am
 
Is this detected file located on the network?
Currently it is the wdPostman program that processes those @@@ files and by default it has no access to the network.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
YorkieBar
YaBB Newbies
*
Offline



Posts: 18
Re: Using the detected file as the body of an emai
Reply #2 - Nov 25th, 2010 at 11:06am
 
Yes - The sub-directory I want to use is part of a large network based directory.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Using the detected file as the body of an emai
Reply #3 - Nov 26th, 2010 at 6:28am
 
Currently you need to allow the wdPostman service to access the network for this to work.
See "Change the User for the WatchDirectory Service" at the bottom of this post: http://watchdirftp.blogspot.com/2010/04/watchdirectory-tasks-as-windows-service....

Note that the post talks about WatchDirectory tasks ("watchDirectory:TheNameOfYourWatchDirectoryTask"), you need to change the Windows service "wdPostman" instead.

I will change the processing of @@@%WD_FILE%@@@ so a future release will let the WD task read the file, instead of the wdPostman program. As the task is already properly configured to access the network that should work better.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
YorkieBar
YaBB Newbies
*
Offline



Posts: 18
Re: Using the detected file as the body of an emai
Reply #4 - Nov 26th, 2010 at 1:30pm
 
I've changed the service to run with an Admin account but the error message is the same. If i put the detected file on the local drive it does work as i want it.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Using the detected file as the body of an emai
Reply #5 - Nov 26th, 2010 at 3:24pm
 
Have a look at the task that is detecting the file (the one creating the emails). If you configure the wdPostman service to use the same user/password it should work.
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
YorkieBar
YaBB Newbies
*
Offline



Posts: 18
Re: Using the detected file as the body of an emai
Reply #6 - Nov 26th, 2010 at 4:18pm
 
The email task isn't a service. All my tasks run as separate tasks under an Admin account on a virtual XP Pro PC rather than services. The WdPostman service uses the same Admin account and password.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: Using the detected file as the body of an emai
Reply #7 - Nov 26th, 2010 at 4:30pm
 
Ah, ok.

Just guessing here, but your WD task is monitoring a mapped drive (X:\somedirectory), not a share (\\server\share\somedirectory)?

In that case the %WD_FILE% variable will expand to
X:\somedirectory\newfile.txt

Problem here is that the X: drive will not be mapped for the wdpostman service....

For the moment (while the @@@filename@@@ processing is done by wdpostman) you can solve this issue by running wdPostman as a "normal program" as well. That way, it will have the same drive mappings as your tasks.

[list][*]Select the menu [b]View -> Email -> Automatically Start/Stop....[/b]
[*]If prompted, tell it to disable the Windows Service for the wdPostman process
[*]Select the menu [b]View -> Email -> Automatically Start/Stop....[/b] again
[*]Tell it to run from the Startup menu instead
[/list]

Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1