<div id="email_content">
<iframe srcdoc="{$email_content}"></iframe>
</div>
div#email_content
srcdoc
src
You need to use htmlentities
method in php
<?php
$str = '<a href="https://www.tarunlalwani.com">Go to tarunlalwani.com</a>';
echo htmlentities($str);
?>
And then assign that to srcdoc
. It works as shown in below JSFiddle