I am trying to get this to send an email each time a file is uploaded. All the
fields in the form are updating the database correctly but the email is never
sent and no error message is generated. Any ideas....please help!!!
<cfif IsDefined("FORM.ID")>
<cfupdate datasource="xxxxxxx" tablename="FTPCatalog">
<cfelse>
<cfinsert datasource="xxxxxxx" tablename="FTPCatalog">
<cfmail to = "#SendTo#"
from = "#EmailAddress#"
subject = "FTP file upload notification!"
server = "mail.server.net" >
A file has been uploaded to the server.
</cfmail>
</cfif>
jdeline - 09 Sep 2007 16:56 GMT
Check the ColdFusion8/mail/spool and ColdFusion8/mail/undelivr directories on your CF server. It may be that mail.server.net is not recognized.
emartek - 09 Sep 2007 17:01 GMT
I am running several other forms on the site that use this server and they are working correctly. Any other ideas?
Azadi - 10 Sep 2007 02:33 GMT
you do realise that your code as it is in your original post will only
send email when a NEW RECORD is INSERTED into the db? no email will be
sent on UPDATE of db because how your cfif/cfelse is constructed.

Signature
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
emartek - 10 Sep 2007 04:48 GMT
Yes I am aware and that is exactly what I want it to do however it does not
send the email either way. I want an email to be sent to the person selected by
the user whenever they upload a file to the site...this is driving me nuts! It
should work as written shouldn't it?
ThreeRavens - 10 Sep 2007 05:14 GMT
do you need a login and password? They may not allow anonymous relaying. I
would look at the cfmail tags you are using in the other apps that are working
and compare them to this. There is more than likely going to be a diference.
Eric