Advertisement

01.16.2008 at 04:37PM PST, ID: 23088957
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Problem with CFPOP and attachemtns

Asked by rshafakian in Cold Fusion Markup Language, ColdFusion Application Server

Tags:

Hello,

I have code that loops through CFPOP and gets all emails and send it out to another email address (ex. emails sent to myemail@mysite.com gets sent to myotheremail@mysite.com).  There are two ways this is done.  One, the user can go on the site and send an email with CFMAIL.  The user can attach a file to the email and send it out.  From there, my process opens up the email using CFPOP and then sends that email along with the attachment to the other email address.  This works fine.  But when a user sends email from their own email client I'm having trouble.  It's attaching a file, but the file is just the original email and not the attachment.  The process is the same process that runs whether it's sent from the site with CFMAIL or from the users own email client (yahoo, hotmail, etc...).Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
This is the CFMAIL code which works fine and the attachments get sent fine from the process that runs...
 
<cfif attachment_1 neq "">
	<cffile action="upload" filefield="attachment_1" destination="C:\upload\" nameconflict="Makeunique">
	<cfset attachmentLocalFile1 = "C:\upload\#file.serverfile#">
</cfif>
 
<cfmail subject="#form.subject#"
		to="#form.email#"
		from="#qReplyTo.email#" cc="">
	<cfmailparam name="reply-to" value="#qReplyTo.email#;">
#form.message#
 
<cfsilent>
<cfif attachment_1 neq "">
	<cfmailparam file="#attachmentLocalFile1#">
</cfif>
</cfsilent>
</cfmail>
 
This is the process that runs the CFPOP and works for the emails recieved that were sent from CFMAIL but not from the users own email client (yahoo, hotmail, etc...)
 
	<cfpop server="myemailserver" name="qMailbox" username="myemail@mysite.com" password="mypassword" action="GETALL" attachmentpath="C:\temp\">
 
	<cfloop query="qMailbox">
 
			<cfmail from="#thefrom#"
					to="myotheremail@mysite.com"
					subject="my subject">					
			My email body
 
			<cfsilent>
				<cfif attachmentfiles NEQ "">
					<cfloop list="#attachmentfiles#" index="attach" delimiters="#chr(9)#">
						<cfmailparam file="#attach#">
					</cfloop>
				</cfif>
			</cfsilent>
			</cfmail>
 
Again, this top code works fine when the email recieved is sent from the site using CFMAIL, but not from the users own email client.
 
Can someone please help?
 
Loading Advertisement...
 
[+][-]02.03.2008 at 10:06PM PST, ID: 20812288

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Cold Fusion Markup Language, ColdFusion Application Server
Tags: CF 5.0
Sign Up Now!
Solution Provided By: Kerrdo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628