mail from php
-
Hi there, How can I pass Hyperlink in mail by using php's mail function. i.e. $mailId = "abc@xyz.com"; $sub = "Testing of passing Hyperlink"; $body = "a target='_blank' href = 'test.com/Testing.php?action=checkLink'>Link Text" mail($mailId, $sub, $body);
-------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)
-
Hi there, How can I pass Hyperlink in mail by using php's mail function. i.e. $mailId = "abc@xyz.com"; $sub = "Testing of passing Hyperlink"; $body = "a target='_blank' href = 'test.com/Testing.php?action=checkLink'>Link Text" mail($mailId, $sub, $body);
-------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)
What you need to do is set the Emails Content-type: header to "text/html". Here is an example:
$message = "<html><body><a href="example.html">Click Here</a></body></html>";
$headers = "MIME-Version: 1.0 \r\n";
$headres .= "Content-type: text/html;charset=iso-8859-1 \r\n
";mail("bob@example.com", "Hello", $message, $headers);
You can find more at: http://au3.php.net/manual/en/function.mail.php[^]
Last modified: 15hrs 48mins after originally posted --
Brad Australian - peterchen on "Who has the worst keyboard" Keyboard? Ha! I throw magnets over the RAM chips!