Perfect... Thanks!!

On 22/7/03 15:21, "Raymond Camden" <[EMAIL PROTECTED]> wrote:

> There you go - you can't define a UDF inside a CFC method. You have to
> define it outside.
> 
> ========================================================================
> ===
> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> (www.mindseye.com)
> Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
> 
> Email    : [EMAIL PROTECTED]
> Blog     : www.camdenfamily.com/morpheus/blog
> Yahoo IM : morpheus
> 
> "My ally is the Force, and a powerful ally it is." - Yoda
> 
>> -----Original Message-----
>> From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 22, 2003 8:15 AM
>> To: CF-Talk
>> Subject: Re: Cfc troubles...
>> 
>> 
>> Ok, hopefully ive take all the stuff I cant show out...
>> 
>> 
>> <cfcomponent hint="send mail container" displayname="sendmail">
>> 
>>     <cffunction name="sendMail" access="public"
>> returntype="boolean" hint="send mail function">
>>     
>>         <!--- defined required arguments --->
>>         <cfargument name="from" type="string" required="false">
>>         <cfargument name="to" type="string" required="true">
>>         <cfargument name="subject" type="string" required="true">
>>         <cfargument name="body" type="string" required="true">
>>         
>>         <!--- begin function --->
>>         <cftry>
>>         
>>             <cfscript>
>>             
>>             // remove all html from the string passed
>>             function removeHTML(s) {
>>                 return rereplace(s, '<[^>]>', '', 'all');
>>             }
>>             
>>             // replace all <p> with CR/LF and all <br> with
>> LF in passed string
>>             function plainTextFormat(s) {
>>                 s = rereplace(s, '<p>',
>> '#chr(13)##chr(10)##chr(13)##chr(10)#', 'all');
>>                 s = rereplace(s, '<br>', '#chr(13)##chr(10)#', 'all');
>>                 return removeHTML(s);
>>             }
>>             
>>             </cfscript>
>>         
>>             <!--- check if from is defined --->
>>             <cfif isdefined('arguments.from') is false>
>>                 <cfset arguments.from = '[EMAIL PROTECTED]'>
>>             </cfif>
>>             
>>             <!--- strip html for plain text version --->
>>             <cfset plaintext = plainTextFormat(body)>
>>         
>>             <!--- send mail --->
>>             <cfmail to="#arguments.to#"
>> from="#arguments.from#" subject="#removeHTML(arguments.subject)#">
>>             
>>                 <p class="title">#removeHTML(subject)#</p>
>>                 #body#
>>             
>>             </cfmail>
>>         
>>             <!--- success!! --->
>>             <cfset myResult = true>
>>             
>>             <!--- catch errors --->
>>             <cfcatch type="any">
>>                 <cfset myResult = false>
>>                 <cfinclude template="../error.cfm">
>>             </cfcatch>
>>         
>>         </cftry>
>>         <!--- end function --->
>>         
>>         <!--- return result --->
>>         <cfreturn myResult>
>>     
>>     </cffunction>
>> 
>> </cfcomponent>
>> 
>> 
>> 
>> On 22/7/03 15:07, "Raymond Camden" <[EMAIL PROTECTED]> wrote:
>> 
>>> How about the full code of your method then? Also, can you view the
>>> CFC's descriptor at least?
>>> 
>>> 
>> ======================================================================
>>> ==
>>> ===
>>> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
>>> (www.mindseye.com)
>>> Member of Team Macromedia
>> (http://www.macromedia.com/go/teammacromedia)
>>> 
>>> Email    : [EMAIL PROTECTED]
>>> Blog     : www.camdenfamily.com/morpheus/blog
>>> Yahoo IM : morpheus
>>> 
>>> "My ally is the Force, and a powerful ally it is." - Yoda
>>> 
>>>> -----Original Message-----
>>>> From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
>>>> Sent: Tuesday, July 22, 2003 8:03 AM
>>>> To: CF-Talk
>>>> Subject: Re: Cfc troubles...
>>>> 
>>>> 
>>>> Not really.. :o) ... NDA
>>>> 
>>>> On 22/7/03 14:59, "Raymond Camden" <[EMAIL PROTECTED]> wrote:
>>>> 
>>>>> I'm not seeing anything there that worries me. Can you
>> show us the 
>>>>> full code of your CFC?
>>>>> 
>>>>> 
>>>> 
>> =====================================================================
>>>> =
>>>>> ==
>>>>> ===
>>>>> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
>>>>> (www.mindseye.com)
>>>>> Member of Team Macromedia
>>>> (http://www.macromedia.com/go/teammacromedia)
>>>>> 
>>>>> Email    : 
>>>> [EMAIL PROTECTED]
>>>>> Blog     : www.camdenfamily.com/morpheus/blog
>>>>> Yahoo IM : morpheus
>>>>> 
>>>>> "My ally is the Force, and a powerful ally it is." - Yoda
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
>>>>>> Sent: Tuesday, July 22, 2003 7:56 AM
>>>>>> To: CF-Talk
>>>>>> Subject: Re: Cfc troubles...
>>>>>> 
>>>>>> 
>>>>>> Aaah
>>>>>> I understand now :)
>>>>>> 
>>>>>> ignite.site.shared.cfc.sendmail
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to