salve ragazzi ho un problema con la libreria PHPmailer...
Il problema sta nel fatto che nella ricezione della mail non viene letto il css.
il codice è questo:
codice:
$messaggio->Body = '<html><head><style type="text/css">';
$messaggio->Body .='#form h1{font-size: Cantarell, Verdana, sans-serif;text-align: center;font-size: 20px;text-shadow: 1px 1px 2px #222;margin-top:0px;}';
$messaggio->Body .='#form h1 span { color: #a90329; }';
$messaggio->Body .='#form {background: url("http://www.xxx.it/images/container.png") no-repeat;width: 500px;height: 309px;margin: 0px 0px;padding: 50px 0px;overflow: hidden;position: relative;top:0px;}';
$messaggio->Body .='#form table {margin: 10px 20px;font-size: 12px;font-weight: bold;}';
$messaggio->Body .='#form table td {padding: 5px 5px 5px 0px;}';
$messaggio->Body .='#form table td:nth-child(2),td:nth-child(4) {color: #a90329;}';
$messaggio->Body .='</style></head><body><div class="form" id="form">';
$messaggio->Body .='';
$messaggio->Body .='<h1><span>RIEPILOGO</span>-Richiesta Preventivo</h1>';
$messaggio->Body .='<table>';
$messaggio->Body .='<tr><td>REGIONE:</td><td>'.$array[0].'</td><td>PROVINCIA:</td><td>'.$array[1].'</td></tr>';
$messaggio->Body .='<tr><td>COMUNE:</td><td>'.$array[2].'</td><td>CAP:</td><td>'.$array[3].'</td></tr>';
$messaggio->Body .='<tr><td>N° COPERTI:</td><td>'.$array[4].'</td><td>N° GIORNI:</td><td>'.$array[5].'</td></tr>';
$messaggio->Body .='<tr><td>PERNOTTAMENTO:</td><td>'.$array[6].'</td></tr>';
$messaggio->Body .='<tr><td>NOME:</td><td>'.$array[7].'</td><td>COGNOME:</td><td>'.$array[8].'</td></tr>';
$messaggio->Body .='<tr><td>EMAIL:</td><td>'.$array[9].'</td></tr>';
$messaggio->Body .='</table>';
$messaggio->Body .= '</div></body></html>';
la mail viene ricevuta correttamente. Ho provato a settare il css inline e cosi funziona, ma io voglio inserirlo nell'head per una questione di maggior leggibilità.
come mai?