Anchor tag not act properly instead show full string inside cfemail content

182 Views Asked by At

I've write a functionality about send email process. Here I've set Mail Server details admin setting. And write a below code for sending email. I can successfully send & receive email to my gmail account. But Here I've added some paragraph with anchor tag value that is click me.

<cfoutput>

    <cfmail from="[email protected]" to="[email protected]" username="[email protected]" password="mypass" port="587"  subject="Chaange title" >
        <p> I'm from test link <a href="http://localhost:8501/test.cfm"> click Me 2! </a> </p>
    </cfmail>

</cfoutput>

The issue is in my email not received as a click me as a link. Instead it will display entire html about anchor tag. FYR please refer my email content image.

enter image description here

Note : I've already tried with cfsavecontent too but it's not help me.

Could you any one help on this. Why it's was happen ? Thanks in advance.

1

There are 1 best solutions below

0
Shawn On

Add type="html" to your cfmail tag. That should indicate to the end user's email client that the message should be displayed as an HTML page instead of just plain text.