views:

71

answers:

1

I'm trying to send with function mail(); rich text containing links ; I'm sending this kind of code...

 Please,  access <a href="http://www.site.md/contact/en/"&gt; Contact </a> to send all these information

throw firebug i can see that link tags was removed , code becoming like this

 Please,  access <a>Contact</a> to send all these information

I need this script , after banning the person who violated rules , to send email to tell the reason why we banned him . On another email services email comes without problems , what is my mistake , sorry for my English , down i'll show a part from script for sending email , the important one..

     // Set and wordwrap message body
 $body = "From: $name\n\n";
 $body .= "Message: $message";
 $body = wordwrap($body, 70);

 // Build header

 $headers  = 'MIME-Version: 1.0' . "\r\n";
 $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";

 $headers .= "From: $email\n";
 if ($cc == 1) {
  $headers .= "Cc: $email\n";
 }
 $headers .= "X-Mailer: PHP/Contact";


 // Send email
 if(!@mail($to, $subject, $body, $headers)) { 
  echo '<b> ERROR ! </b> Unfortunately, a server issue prevented delivery of your message<br />'; }
+2  A: 

Unless you are doing something to $body in the code you have not posted here, my guess is that it is wordwrap() that causes the problem. In the php manual is a user-contributed function which might help: http://www.php.net/manual/en/function.wordwrap.php#89782

jah
Is not working , i deleted this function , and the problem is not solved , i told that this problem is on gmail , on another email services , is coming without problem . Then the problem is with gmail , but thx for your answer jah ;)
mIRU