| Posted By |
Discussion Topic: CFMail issue with Attachments
|
|
jfill |
04-12-2006 @ 4:58 PM |
|
|
Senior Member
Posts: 446
Joined: Apr 2004
|
I am having problems sending mail with an attachment and just cannot diagnose the problem.
When I send mail without an attachment it works fine. When I remove the attachment code and just include the attachment path:
#trim(request.cfinstdocs)#\#trim(getInstFiles.fileName)#
The path to the file displays in the email just fine as it should "D:\inetpub\mydomain\documents\inst\Terms_of_Use.doc" which is a valid path. But as soon as I hardcode the attachment code, or run the code that I have below with the attachment part, I do not get the mail. I do not get errors either. So it must be dying at the server and I cannot figure out why....
Any insight would be appreciated.
Thanks.
jfill
<cfmail to="#trim(email)#" from="support@mydomain.com" subject="#trim(attributes.Subject)#" query="getRecipients" server="#trim(request.mailserver)#" username="support@mydomain.com" password="MyPass" failto="#trim(request.sendFailTo)#" spoolenable="no"><cfmailparam name="Reply-To" value="#Trim(attributes.fromAddress)#">#ReplaceNoCase(ReplaceNoCase(ReplaceNoCase(attributes.message,"{last_Name}", "#lname#", "ALL"),"{prefix}","#prefix#", "ALL"),"{first_name}","#fname#", "ALL")# ====================================== Powered by: mydomain.com If you feel this message has been sent in error please contact our support department at: support@mydomain.com<cfsilent><cfif trim(attributes.FileID) NEQ "" AND getInstFiles.recordCount NEQ "0"><cfloop query="getInstFiles"><cfif FileExists("#trim(request.cfinstdocs)#\#trim(getInstFiles.fileName)#")><cfmailparam file="#trim(request.cfinstdocs)#\#trim(getInstFiles.fileName)#"></cfif></cfloop></cfif></cfsilent></cfmail>
This message was edited by jfill on 4-12-06 @ 4:58 PM
|
falconseye |
04-12-2006 @ 5:40 PM |
|
|
Senior Member
Posts: 1033
Joined: Mar 2004
|
could you try without the <Cfsilent> ?
|
jfill |
04-12-2006 @ 5:59 PM |
|
|
Senior Member
Posts: 446
Joined: Apr 2004
|
falconseye, Thanks for the reply. I tried it without the cfsilent....no luck. Any other thoughts? I have asked the hosting company to look in the logs to see if there are any errors, I have not gotten a reply yet.
|
jfill |
04-12-2006 @ 7:42 PM |
|
|
Senior Member
Posts: 446
Joined: Apr 2004
|
Ok I figured it out. It was the actual file I was attaching..... I have not clue but I an attach any other file and it works just fine. Now my question is, what could be wrong with that file?? I know the path was correct and the file existed. Any ideas.
|
jarottman |
04-13-2006 @ 12:53 PM |
|
|
Senior Member
Posts: 679
Joined: Sep 2004
|
Have you checked your mail server to verify that it is trying to spool the email. It if is spooling you can also check to make sure that it is not being quaratined.
| There's no place like /root | There's no place like /root | There's no place like /root |
|
jfill |
04-13-2006 @ 12:57 PM |
|
|
Senior Member
Posts: 446
Joined: Apr 2004
|
Well when I renamed the file it sent just fine. Something with the name I guess. I am no a shared server so it is like pulling teeth to get at that info. It seems to be working now as long as the files are not named Terms_of_Use.doc
|