Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Sirena #1
cfmail attachment
Can someone help Please. Not till I read a message in this board did I found
out that the <cfmailparam file> tag only uploads files from the server. The
PROBLEM: Files will not exist on server, we have 3rd party hosting. Right now.
I'm creating a mail page where a user fills all the information (To, From, Msg,
Subject) AND Adds files from their computer. Does any one know how I can code
so that a users local computer files are attached to a <cfmail tag> instead of
this tag looking for the file in the server ? Thanks.
Sirena Guest
-
CFMail Dynamic Attachment
Greetings, I have a form that a user fills out and it sudmits to a page that uses cfmail. That cfmail tag sends an attachment to a web admin. The... -
CF5 cfmail sending blank .txt attachment
we're having a wierd problem with CF5 CFMAIL. We sent out 350 emails and 300 were sent out with the correct attachment and 50 were sent out with... -
CFMAIL change attachment file content
My application has function to export data as textfile. This generated textfile then will be sent via email as attachment. Generated file has... -
cfmail attachment not found on my computer
I've seen many users here in the forum talking about attaching a file using the <cfmailparam> tag, but I can't get it to work. Please help me. Just... -
cfmail - Attribute validation error for tag CFMAIL.
I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ... -
vkunirs #2
Re: cfmail attachment
Hi
once the user uploads the files using the browse option, in the program you need to upload that file to some directory
and give the directory/ file name in the cfparam tag.
vkunirs Guest
-
Sirena #3
Re: cfmail attachment
Well, I have a page where users are allowed upload multiple attachments. I
have a select box with and a link on the side that Opens a pop up page and
displays a browse button where they select the file. As they pick and add a
file, the file name and path is inserted in the Parents combo box. So, I have
an unlimited number of attachments they can attach. So the combo box has the
path of the files users want to send to people. The requirement if for this
attachments not to be stored in the webpage. They are just sent and not
stored. Is there a way to do this? As the file paths that users want to send
are in a drop down and not in a actual input type = file (browse)
Sirena Guest
-
Sirena #4
Re: cfmail attachment
See email below for question ... I just learned how to reply in this forum.
Sirena Guest
-
ltsakiris #5
Re: cfmail attachment
Originally posted by: vkunirs
Hi
once the user uploads the files using the browse option, in the program you
need to upload that file to some directory
and give the directory/ file name in the cfparam tag.
After a while, however, that folder can start to take up a lot of space on
your server unless you manually go into it once a week and delete everything.
Is there a way to somehow automatically delete the file after the message has
been sent? If the server spools mail and does not deliver it right away, how
would this be possible?
ltsakiris Guest
-
rmorgan #6
Re: cfmail attachment
Heres what I do:
First page:
Put this in your form
<input type="file" name="file">
Action Page:
<cfif #form.file# IS "">
<cfelse>
<cffile action="upload" destination="destination" nameConflict="overwrite"
fileField="Form.file">
</cfif>
<cfif isdefined("form.file")>
<cfset serverfile = #form.file#>
</cfif>
<form method="post">
<cfmail type="html" from="from email" subject="Subject" to="to email"
spoolenable="no">
<cfif isdefined("file.serverfile")>
<cfmailparam file="destination\#file.serverfile#">
</cfif>
Anything else you want in the message
</cfmail>
</form>
<!--- Delete file after uploading --->
<cfif isdefined("file.serverfile")>
<cffile action="delete" file="destination\#file.serverfile#">
</cfif>
rmorgan Guest
-



Reply With Quote

