no body on email from cfmail

608 Views Asked by At

I have this code that is sending an email to me when some query is running on database from coldfusion. I'd receive the email without problems but there is no body on it, only shows the subject. I tryed using no type on cfmail tag and changing the cfmailpart tag type="html" for type="text", but nothing happens. The funny thing is that in my local folder CF8/mail/undelivr i can see the body of the email and shows itself without problems, but when this code go to production, doesn't work. Some clue about what is happening?

this is the code i'm using now:

<cfset fechaActual = dateformat(Now(),"dd-mm-yyyy") >
<cfset horaActual = TimeFormat(now(), "HH:mm:ss") >
<cfset archivoActual = CGI.http_host  & CGI.script_name & "?"  & CGI.query_string>

<cfmail type="html" to="[email protected],[email protected],[email protected]" from="[email protected]" subject="Delete tabla xxx #fechaActual# hrs.">
    <cfmailpart type="text">
        Este aviso indica que ha sido ejecutado un DELETE en la tabla xxx.

        Hora de ejecución: #horaActual#
        Fecha de ejecución: #fechaActual#
        Ruta:D:\xxx\xxx\xxx\xxx\xxx.cfm
        Url: #archivoActual#
        Linea: xx
        IDs Eliminados: #idaviso#
    </cfmailpart>
</cfmail>

Thank you!!! best regards

1

There are 1 best solutions below

2
On

I suggest using both text and HTML cfmailparts. Including both increases the probability that they will be readable by everyone. You might want to make the text only cfmailpart very basic with limited information.

Be sure to include text only within the text cfmailpart and HTML formatted text in the HTML cfmailpart.

<cfmail type="html">
    <cfmailpart type="text">
        Este aviso indica
    </cfmailpart>
    <cfmailpart type="html">
        <p>Some HTML words</p>
    </cfmailpart>
</cfmail>