Jump to content

Recommended Posts

ok well this scripts sends the email but when i put <a href="index.php">hey</a> it desplays it exactly , no link! like it shows all of the html code!

 

<?php
require_once "Mail.php";

$from = "glenn";
$to = "[email protected]";
$subject = "From Glenn";
$body = "<a href='index.php'> hey</a>";

$host = "smtp.gmail.com";
$username = "[email protected]";
$password = "password";
$port = "587";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);

$smtp = Mail::factory('smtp',
  array ('host' => $host,
  	'port' => $port,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
} else {
  echo("<p>Message successfully sent!</p>");
}
?>

Link to comment
https://forums.phpfreaks.com/topic/248070-php-mail-not-working/
Share on other sites

That doesn't mean php mail() isn't working. In fact it means the exact opposite, that php mail() is working.

 

Most mail clients do not, by default, render html sent in text emails. See example #4.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.