admin@xxxxxxxxxxxxxxxxxxx wrote:
The Answer is quiet simple.
$E_MAIL = "to@xxxxxxxxxxxxx";
$to = "to@xxxxxxxxxxxxx";
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "To: Their Name<to@xxxxxxxxxxxxxx> \r\n";
$headers .= "From: your email <your@xxxxxxxxx>\r\n";
$link = "http://www.zoneofsuccessclub.com";
$mailmsg = "BLAH BLAH BLAH link:<a href=$link>zoneofsuccessclub</a>";
$mailsubject = "what ever you want to say";
Well, anyone doing this:
mail("$E_MAIL", "$mailsubject", "$mailmsg", "$headers");
makes ME very unhappy. I don't get it, what's so hard to understand
about NOT HAVING TO USE ANY QUOTES HERE ? Are you defining any type of
string-like values here? no. Then you don't need quotes, right? no, you
don't. SO DON'T USE THEM HERE THEN.
You're defining a $to and an $E_MAIL, you're not using $to anywhere, and
only using $E_MAIL in one place (out of two), thus creating a mismatch
between your headers and the To parameter for mail (which is used in
SMTP traffic). [iz bad (tm)]
- Tul
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@xxxxxxxxx]
Sent: Saturday, November 10, 2007 2:36 PM
To: php-general@xxxxxxxxxxxxx
Subject: 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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php