At 11:33 1/2/01 -0500, you wrote:
>There is no difference between calling cfmail from a custom tag.  And, since
>you've already done a test and it is not your mail server then I think there
>is more than likely a bug in your custom tag.  If you post the code then it
>would be easier to diagnoe.

OK, here is the entire tag. The code where it actually sends the email is
near the bottom.

------------------------------------------------------------------------
<CFSET defaultto = "[EMAIL PROTECTED]">

<CFIF IsDefined("attributes.body") OR ThisTag.ExecutionMode EQ "end">

    <!--- set the defaults here --->
    <CFPARAM NAME="Attributes.from"    DEFAULT="[EMAIL PROTECTED]">
    <CFPARAM NAME="Attributes.subject" DEFAULT="Email From Cold Fusion Application">
    
    <!--- if to was left blank, try to get the errors to email address from the
    database. If that fails, set it to our hardcoded value. (top) ---> 
    <CFIF not IsDefined("Attributes.to")>   
        <CFTRY>
            <CFQUERY NAME="GetErrorEmail" DATASOURCE="#request.appname#">
            SELECT errorsto FROM cfggeneral
            </CFQUERY>
            <CFCATCH TYPE="Any">
                <CFSET Attributes.to = defaultto>
            </CFCATCH>
        </CFTRY>
        
        <CFIF IsDefined("GetErrorEmail.errorsto") AND Len(GetErrorEmail.errorsto)>
            <CFSET Attributes.to =  GetErrorEmail.errorsto>
        </CFIF>
    </CFIF>
    
    <!--- if we were called in a pair context (<tag></tag>), then the text
    between the tags will be the body of the email --->
    <CFIF ThisTag.ExecutionMode EQ "end">
        <CFSET Attributes.body = ThisTag.GeneratedContent>
        <!--- then blank it out or it will show up on the poge --->
        <CFSET ThisTag.GeneratedContent = "">
    </CFIF>
    
    <!--- then send the email --->
    <CFMAIL TO="#Attributes.to#" FROM="#Attributes.from#" 
SUBJECT="#Attributes.subject#">why so short? why so short? #Attributes.body#</CFMAIL>
</CFIF>
------------------------------------------------------------------------

Note that the more "why so short? " strings I put inbetween the CFMAIL
tags, the more #Attributes.body# is truncated. Only 2046 characters
between the CFMAIL tags will be sent.

BTW, I'm running 4.5.1 SP2 on linux.

Thanks,
Ryan


~~~~~~~~~~~~~ Paid Sponsorship ~~~~~~~~~~~~~
Get Your Own Dedicated Win2K Server!      Instant Activation for $99/month w/Free 
Setup from SoloServer      PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support     
 Visit SoloServer, https://secure.irides.com/clientsetup.cfm.

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to