# Php and html emails

**URL:** <https://forum.kirupa.com/t/php-and-html-emails/191805>\
**Category:** Uncategorized\
**Created:** [June 23, 2006, 4:32am UTC](https://forum.kirupa.com/t/php-and-html-emails/191805 "2006-06-23T04:32:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbrollwitme](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@pbrollwitme](https://forum.kirupa.com/u/pbrollwitme)\
**Post date:** [June 23, 2006, 4:32am UTC](https://forum.kirupa.com/t/php-and-html-emails/191805/1 "2006-06-23T04:32:21Z")

</div>

Hi all,

I need to pass some simple html into my email being sent out using the mail() function in php.

basically, I have a dynamically generated string that I want to act as a link.

Here is an example of what I mean:

$source = [http://www.yahoo.com](http://www.yahoo.com);  
$message = “Thanks, \<a href=$source target=’\_blank’\>Click Here\</a\> to continue.”;

I would want the email to say: Thanks, Click Here to continue.

And Click Here acts as a link to [yahoo.com](http://yahoo.com)

However, when I run that with php it is writing the whole message line. Anyone know how to fix this?

Thanks,  
Mat
