You forgot you # signs...

> <cfmail subject="queryemail.tblemails_subject"
>   to="queryemail.tblemails_to" 
>   from="queryemail.tblemails_from" 

should be

> <cfmail subject="#queryemail.tblemails_subject#"
>   to="#queryemail.tblemails_to#" 
>   from="#queryemail.tblemails_from#" 

Not a CFC issue - just a syntax issue.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
Yahoo IM : cfjedimaster

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Ali Daniali [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 04, 2002 8:52 PM
> To: CF-Talk
> Subject: CFC newbie question
> 
> 
> After hearing about CFCs and reading about CFCs I have finally decided
> to write my first CFC. But I'm not sure if I have this whole 
> CFC concept
> figured out. Below is my first CFC. I have not been able to get it to
> work and was wondering if someone might be able to give me some help.
>  
> Basically I have a database table with a whole bunch of 
> emails that can
> be sent during a particular online application. Instead of embedding
> CFMAIL one after another in my code I wanted to separate it 
> all...enter
> CFCs...right?
>  
> So I evoke this CFC passing an email ID argument to the the
> component...it looks it up the email ID in the database and zap...its
> supposed to send the right email....so here it is....what am I doing
> wrong?
>  
> Thank you in advance....
>  
> <CFCOMPONENT hint="Database Driven Email Processing">
>  <CFFUNCTION name="sendMail" access="private" returntype="binary"
> hint="Process Emails">
>   <CFARGUMENT name="emailID" type="numeric" required="true" 
> hint="ID of
> Email to send">   
> <cftry>
>   <CFQUERY name="queryemail" datasource="dbEP3">
>    SELECT *
>    FROM tblemails
>    WHERE tblemails_ID = ARGUMENTS.emailID
>   </CFQUERY>
> <cfmail subject="queryemail.tblemails_subject"
>   to="queryemail.tblemails_to" 
>   from="queryemail.tblemails_from" 
>   cc="queryemail.tblemails_cc" 
>   bcc="queryemail.tblemails_bcc" 
>   query="queryemail.tblemails_query1" 
>   server="queryemail.tblemails_server" 
>   type="queryemail.tblemails_type">
> #queryemail.tblemails_message1##queryemail.tblemails_message2#
> </cfmail>
> <CFCATCH type="database"><cfset success = False><CFRETURN
> success></CFCATCH>
> <CFCATCh type="any"><cfset success = False><CFRETURN 
> success></CFCATCh>
> </cftry>
>   <cfset success = True>
>   <CFRETURN success>
>  </CFFUNCTION>
> </CFCOMPONENT>
>  
> Best Regards,
> Ali Daniali
>  
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ali Daniali
> Director, Development and Programming
> TransACT Communications, Inc.
> 8423 Mukilteo Speedway, Suite 100
> Mukilteo, WA 98275
> Tel: 425.977.2117
> FAX: 425.977.2080
> Email: [EMAIL PROTECTED]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to