Skip to main content
Known Participant
September 19, 2008
Question

Cold fusion Mailing feature

  • September 19, 2008
  • 19 replies
  • 1912 views
I dont have an exchange server setup. I want to provide the mailing facility in one of my tool, which is used by members connected through LAN. I tried using 127.0.0.1 as the server but it did not work for my local system also.
Please provide me the means by which i can accomplish this.
This topic has been closed for replies.

19 replies

Participating Frequently
November 19, 2008
sachin, were you ever able to get the directory watcher working? my CONFIG and CFC look exactly as yours do and I can't get it to work... the CF EG instance says "Running" but the gateway is not invoking the CFC method...
sachin_tdAuthor
Known Participant
January 5, 2009
yes i am also facing the same problem. any day if you get the solution to this problem please send me the solution as well.
sachin_tdAuthor
Known Participant
November 11, 2008
Hi azadi i wrote the code, but its not working. below is the code for cofig file and the component file.

Config.ini
# The directory you want to watch. If you are entering a Windows path
# either use forward slashes (C:/mydir) or escape the back slashes (C:\\mydir).
directory=C:/CFusionMX7/Mail/Undelivr

# Should we watch the directory and all subdirectories too
# Default is no. Set to 'yes' to do the recursion.
recurse=no

# The interval between checks, in miliseconds
# Default is 60 seconds
interval=6000

# The comma separated list of extensions to match.
# Default is * - all files
extensions=*

# CFC Function for file Change events
# Default is onChange, set to nothing if you don't want to see these events
changeFunction=

# CFC Function for file Add events
# Default is onAdd, set to nothing if you don't want to see these events
addFunction=onAdd

# CFC Function for file Delete events
# Default is onDelete, set to nothing if you don't want to see these events
deleteFunction=


Component: watcher.cfc

<cfcomponent>

<cffunction name="onAdd">
<cfargument name="cfevent">
<cfset var myfile = arguments.cfevent.data.filename>
<cfset var newdest = getDirectoryFromPath(myfile)>

<!--- copy to ready --->
<!--- newdest is the same path as spool, so 'cheat' and switch to ready --->
<cfset newdest = replace(newdest, "/Undelivr", "/spool")>
<cffile action="move" source="#myfile#" destination="#newdest#/#getFileFromPath(myfile)#">

<cflog file="dirwatcher" text="Moved to #newdest#/#getFileFromPath(myfile)#">

</cffunction>
</cfcomponent>

Please provide support for the same.


Thanks,
Sachin
sachin_tdAuthor
Known Participant
November 5, 2008
None
Inspiring
November 4, 2008
if using FAILTO attribute does not work (can't remember if it fails to
only when getting a failed response from destination server or if cf
fails to send email too), then you can implement a Directory Watcher
Gateway to watch for new files being added to undelivered folder...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
sachin_tdAuthor
Known Participant
November 4, 2008

Hi azadi thanks for a quick response. Can you please tell me how can i implement the "Directory Watcher Gateway" Feature.


Thanks
Inspiring
November 4, 2008
use FAILTO attribute of CFMAIL tag

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
sachin_tdAuthor
Known Participant
November 4, 2008
Hi i have a problem in cold fusion wherein i need an email notification to web administrator mail box in case any email notification from my website goes to undelivered folder. so that i can again send them by moving files from undelivered to spool folder.
sachin_tdAuthor
Known Participant
November 3, 2008
The mail does not goes to either spool or the undeliver folder. Below is the code.

I have already set the mail server in the cold fusion administrator.

<cfmail to="sachin.chawla@teradata.com" from="sachin.chawla@teradata.com" subject="Test Mail">
This is a test email.
</cfmail>
sachin_tdAuthor
Known Participant
November 4, 2008
This problem will probably be resolved by reinstalling the cold fusion. :>)
tclaremont
Inspiring
October 31, 2008
Does the mail even get to the spool folder?

Show us the actual CFMAIL code that you are using.
sachin_tdAuthor
Known Participant
October 31, 2008
I am facing a problem in cf5 with the cfmail tag. Below is the specific error i recieved.

Error Diagnostic Information

Unknown Exception condition

TagCFMail::sendMessage

Some of the changes which i tried are:
1. In the registry added a string variabl e"Delay" with timestamp varying from 130 upto 500: This also did not worked.

2. Already have Mail folder and its subdirectory in the Cfusion folder.

3. Number of times restarted the CF Services: still problem persists

Can anyone help me in resolving this issue please?
sachin_tdAuthor
Known Participant
October 31, 2008
The mailing functionality feature problem has been resolved by including the system name in the mail server name