Muchas gracias!
Ahora funciona correctamente. En el email ya llegan los caracteres especiales como los acentos y las ñ...
Solo queda un problema: En el "
Subject" y en el "
From:" del mail que me envia php (con $nombre_php) no me salen los acentos ni las ñ... (me sale
ú etc...)
Alguna idea??
Código:
$email2_php = "[email protected]";
$Name = $nom_php;
$email = $email_php;
$recipient = $email2_php;
$mail_body = '
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Documento sin tÃ*tulo</title>
</head>
<body>
<p>BUTLLETA DE SOCI DE ' .$nom_php.'</p>
<table width="400" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="142">Nom</td>
<td width="258">' .$nom_php.'</td>
</tr>
<tr>
<td>DNI</td>
<td>' .$dni_php.'</td>
</tr>
<tr>
<td>Data de Naixement</td>
<td>' .$data_php.'</td>
</tr>
<tr>
<td>Domicili</td>
<td>' .$domicili_php.'</td>
</tr>
<tr>
<td>Població</td>
<td>' .$poblacio_php.'</td>
</tr>
<tr>
<td>Telèfon</td>
<td>' .$telefon_php.'</td>
</tr>
<tr>
<td>E-mail</td>
<td>' .$email_php.'</td>
</tr>
<tr>
<td>Titular del Compte</td>
<td>' .$titular_php.'</td>
</tr>
<tr>
<td>Banc</td>
<td>' .$banc_php.'</td>
</tr>
<tr>
<td>Compte</td>
<td>' .$compte_php.'</td>
</tr>
<tr>
<td>Modalitat</td>
<td>' .$tipus_php.'</td>
</tr>
</table>
</body>
';
$subject = $nom_php . " Ha omplert la butlleta de soci";
$header = "From: ". $Name . " <" . $email . ">\r\nContent-type: text/html\r\n";
mail($recipient, $subject, $mail_body, $header);
echo " envia el mail ";