'MIME-Version: 1.0' . "\r\n";
'Content-type: text/html; charset=UTF-8' . "\r\n"; puestos, pero no se que sucede.
Gracias
Código :
$identificador= $_POST['identificador']; $usuario= $_POST['usuario']; // $email_from= "correo"; $email_to=correo; // $body_envio= ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Pedido a Dasa</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <body,td,th {font-family: Arial;font-size: 14px;} .Estilo2 {font-family: Arial;font-size: 12px;color: #666666;} .Estilo5 {font-family: Arial;font-size: 12px;font-weight: bold;color: #FFFFFF;} .Estilo6 {font-family: Arial;font-size: 12;} .Estilo7 {font-family: Arial;font-size: 12px;color: #6699CC} .Estilo8 {font-family: Arial;font-size: 12px; color: #666666; } a:link {color: #6699CC; text-decoration: none; }a:visited {text-decoration: none;color: #6699CC;} a:hover {text-decoration: none;color: #6699CC;} a:active {text-decoration: none;color: #6699CC;} </style> </head> <body> <p><img src=../images/clientes/mail.gif width="220" height="120" /></p> <p class="Estilo8">Estimado(s) '.$nombre_usuario.'</p> <p class="Estilo8">Muchas gracias por su compra, el número de orden de su pedido es: '.$identificador.'<br> Detalle:</span> <table width="650" border="1" cellpadding="0" cellspacing="0" bordercolor="#6699CC"> <tr> <td width="180" height="23" bgcolor="#6699CC"><div align="center" class="Estilo5">Producto</div></td> <td width="220" height="23" bgcolor="#6699CC"><div align="center" class="Estilo5">Color</div></td> <td width="120" height="23" bgcolor="#6699CC"><div align="center" class="Estilo5">Cantidad en kilos</div></td> <td width="120" height="23" bgcolor="#6699CC"><div align="center" class="Estilo5">Precio por kilo</div></td> <td width="80" height="23" bgcolor="#6699CC"><div align="center" class="Estilo5">Total</div></td> </tr>'; $buscar_pedido= mysql_query("SELECT ped.id_sesion,prod.descripcion as producto,col.descripcion as color,ped.cantidad,format(ped.precio,2)as precios FROM pedidos ped, productos prod, colores as col WHERE ped.id_sesion='$identificador' AND ped.usuario='$usuario' AND ped.producto= prod.codigo AND ped.color= col.codigo") or die (mysql_error()); $total= 0; while($row_pedido= mysql_fetch_array($buscar_pedido)){ $producto= trim($row_pedido[producto]); $color= $row_pedido[color]; $cantidad= $row_pedido[cantidad]; $precio= "$ ".number_format ($row_pedido[precios], 2, '.', ','); $temp_unitario=$row_pedido[precios]/$cantidad; $total = $row_pedido[precios]+$total; $precio_unitario= "$ ".number_format ($temp_unitario, 2, '.', ','); $body_envio.= ' <tr> <td height="25"><div align="center" class="Estilo2">'.$producto.'</div></td> <td height="25"><div align="center" class="Estilo2">'.$color.'</div></td> <td height="25"><div align="center" class="Estilo2">'.$cantidad.'</div></td> <td height="25"><div align="center" class="Estilo2">'.$precio_unitario.'</div></td> <td height="25"><div align="center" class="Estilo2">'.$precio; } $body_envio .= "</div></td></tr></table>"; $monto_total= "$ ".number_format ($total, 2, '.', ','); $body_envio .= ' <p class="Estilo2">El importe total de su pedido es de: '.$monto_total.'</p> <ul><li class="Estilo2">El importe total del pedido es aproximado.</li><li> <span class="Estilo2">El personal de Dasa se pondra en contato con usted a la brevedad posible.</span></li></ul></p> <p class="Estilo8">Muchas gracias.</p><p class="Estilo7">Dasa<br> <a href="http://www.dasa.com.mx" target="_blank">http://www.dasa.com.mx</a><br> <a href="mailto:[email protected]">[email protected]</a> </body> </html>'; // $cabeceras = 'MIME-Version: 1.0' . "\r\n"; $cabeceras .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; $cabeceras .= 'From: $MailFrom' . "\r\n"; $MailTo = $email_to; "\n"; $Subject = "Solicitud de Pedido número ".$identificador. "\n"; $Body = $body_envio; "\n"; $MailFrom = $email_from; "\n"; mail($MailTo, $Subject, $Body, "From: $MailFrom",$cabeceras); }