RE: [PHP] Cannot send a hyperlink
| From: | admin at buskirkgraphics dot com | Date: | Sun, 11 Nov 2007 10:10:26 +0000 |
| Subject: | RE: [PHP] Cannot send a hyperlink | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264312@lists.php.net to get a copy of this message | ||
The Answer is quiet simple.
$E_MAIL = "to@thiermail.com";
$to = "to@thiermail.com";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: Their Name<to@thieremail.com> \r\n";
$headers .= "From: your email <your@email.com>\r\n";
$link = "http://www.zoneofsuccessclub.com";
$mailmsg = "BLAH BLAH BLAH link:<a href=$link>zoneofsuccessclub</a>";
$mailsubject = "what ever you want to say";
mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers");
You can use the database to generate the $E_MAIL address and the $to
Never Ever had this to not work.
Your problem is the Headers are missing which allows the html content to
embed into the email.
Try that I think you will be happy.
-----Original Message-----
From: Brad [mailto:brads@ftnco.com]
Sent: Saturday, November 10, 2007 2:36 PM
To: php-general@lists.php.net
Subject: [PHP] Cannot send a hyperlink
I am having trouble send an email with a hyperlink
Php is parsing html as text????
If I add the proper header information to ?make it work? The email no longer
goes through?
Here is the code
<?
$email = $_REQUEST['email'] ;
$body = '<a href="'.www.zoneofsuccessclub.com.'">link
</a>';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail( $email, "Your FREE book from Zone of Success Club .com",
$headers, $message, "From: $email" );
?>
Thanks
Brad
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.15.28/1122 - Release Date: 11/10/2007
10:41 AM