2009-10-23 7 views
0

j'ai essayé d'envoyer un courriel html, mais je suppose que je suis en train de faire qqch malphpmailer problème email html

voici mon code pour une partie du corps

$body .= "<table style=width: 800px; height: 600px;background-image: url('http://www.myserver.net/image/temp1.jpg');background-repeat:no-repeat><tr><td><table style=width: 100%>"; 
    $body .= "<tr><td align=center style=width: 345px><img height=350 style=width: 350px /></td><td align=center><table style=width: 100%; height: 364px><tr>"; 
    $body .= "<td style=height: 126px><img height=107 width=307 /></td></tr><tr><td><table style=width: 100%; height: 215px><tr><td style=width: 64px></td>"; 
    $body .= "<td align=left style=width: 105px>Artist Name</td><td style=width: 22px>:</td><td>" . $aname ."</td></tr><tr><td style=width: 64px></td>"; 
    $body .= "<td align=left style=width: 105px>Title</td><td style=width: 22px>:</td><td>" . $rname ."</td></tr><tr><td style=width: 64px></td>"; 
    $body .= "<td align=left style=width: 105px>Release Date</td><td style=width: 22px>:</td><td>" . $rdate ."</td></tr><tr><td style=width: 64px></td>"; 
    $body .= "<td align=left style=width: 105px>Tracks</td><td style=width: 22px>:</td><td><table style=width: 100%><tr><td></td></tr></table></td></tr>"; 
    $body .= "<tr><td style=width: 64px></td><td style=width: 105px></td><td style=width: 22px></td><td></td></tr><tr><td style=width: 64px></td>"; 
    $body .= "<td style=width: 105px></td><td style=width: 22px></td><td></td></tr><tr><td style=width: 64px></td>"; 
    $body .= "<td style=width: 105px></td><td style=width: 22px></td><td></td></tr></table></td></tr></table></td></tr></table></td></tr><tr><td align=center>If you want to unsubscribe from this promo list, please <a href=http://www.myserver.net/promo/unsubs.php?lid=". $id .">click here</a></td></tr></table>"; 

mais il a entraîné comme ça dans gmail

alt text http://img148.imageshack.us/img148/8618/screenhunter01oct232033.jpg

Qu'est-ce qui ne va pas ??

merci.

Répondre

0

Gmail bandes sur les images de fond. Malheureusement, avec le courrier électronique HTML, vous êtes vraiment limité dans ce que vous pouvez faire avec CSS.

Voir cet article pour plus d'informations: http://articles.sitepoint.com/article/designers-guide-html-email

+0

donc je ne peux pas utiliser les images de fond, wow putain –

0

Tout d'abord, ajouter quelques citations autour de vos styles:

$body .= "<table style=\"width: 800px; height: 600px;background-image: url('http://www.myserver.net/image/temp1.jpg');background-repeat:no-repeat\"> 

<tr><td><table style=\"width: 100%\">";