From: Jacky [mailto:[EMAIL PROTECTED]]
> >
> >
> > people,
> > I tried to write out email using sniplet below, the email will write out
> the
> > hyper link so that reciever can click on the link to go to the page.
What
> > happen is that the reciever recieve the actual link instead of the hyper
> > link I made, so I wonder what did I do wrong. I have mad sure that the
> email
> > software I used to test can read html format ( I use outlook express).
> >
> > $mailTo = "[EMAIL PROTECTED]";
> > $mailSubject = "test";
> > $mailBody = "Dear sir, \n\n";
> > $mailBody = "Below is the link you can click on, \n\n";
> > $mailBody .= "<html><body>Please Click <a
> > href=\"www.php.net\">Here</a></body></html> to view the request
details";
> > $mailHeaders = "From: [EMAIL PROTECTED]\n";
> > mail($mailTo, $mailSubject, $mailBody, $mailHeaders);
> >
You need to tell the mail reader that the message is HTML, using a
Content-Type header. Plus your message is not well-formed HTML anyway
(message should be an HTML document, not HTML inside plain text). Try this:
<?php
$mailTo = "[EMAIL PROTECTED]";
$mailSubject = "test";
$mailBody = "<html><body>Dear sir, \n\n";
$mailBody .= "Below is the link you can click on, \n\n";
$mailBody .= "Please Click <a
href=\"http://www.php.net\">Here</a> to view the request
details</body></html>";
$mailHeaders = "From: mailto:[EMAIL PROTECTED]\n";
$mailHeaders .= "Content-Type: text/html\n";
mail($mailTo, $mailSubject, $mailBody, $mailHeaders);
?>
Cheers
Simon Garner
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]