ballouta Posted April 21, 2009 Share Posted April 21, 2009 Hello, when someone subscribers in my newsletter (for example) an automatic reply is sent tor that email address. I have a certain layout for that automatic email, blue background for all the page with a centered table that included a header and a footer photos, with some text in the middle. <?php $message ="<body bgcolor='#01245C'> <div align='center'> <table border='0' width='761' id='table1' cellspacing='0' cellpadding='0'> <!-- cells and other text here !--> </tr> </table> </div> </body>"; ?> the problem is that the background of the page is still white in the message sent. where is the problem? Thank you Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/ Share on other sites More sharing options...
jesushax Posted April 21, 2009 Share Posted April 21, 2009 try using css to style it <body style="background:#01245C;"> Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/#findComment-815280 Share on other sites More sharing options...
Yesideez Posted April 21, 2009 Share Posted April 21, 2009 Technically... $message ='<body style="background-color:#01245C"> <div align="center"> <table border="0" width="761" id="table1" cellspacing="0" cellpadding="0"> <!-- cells and other text here !--> </tr> </table> </div> </body>'; I agree with jesushax - CSS - see what else I did? Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/#findComment-815283 Share on other sites More sharing options...
ballouta Posted April 21, 2009 Author Share Posted April 21, 2009 I replaced the body tag with the style you provided, but the message still have white background, do I have to add <html> .. </html> to the $message? thanks Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/#findComment-815291 Share on other sites More sharing options...
Yesideez Posted April 21, 2009 Share Posted April 21, 2009 Let's add some more CSS... $messag =' <style type="text/css"> body {background-color:#01245C;} </style> <body> <div align="center"> <table border="0" width="761" id="table1" cellspacing="0" cellpadding="0"> <!-- cells and other text here !--> </tr> </table> </div> </body>'; If that doesn't work try this: $messag =' <style type="text/css"> body {background-color:#01245C;} bg {background-color:#01245C;} bg td {background-color:#01245C;} bg tr {background-color:#01245C;} </style> <body> <div align="center"> <table border="0" width="761" id="table1" cellspacing="0" cellpadding="0" class="bg"> <!-- cells and other text here !--> </tr> </table> </div> </body>'; Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/#findComment-815292 Share on other sites More sharing options...
ballouta Posted April 21, 2009 Author Share Posted April 21, 2009 you know, i just noticed that the background appears in gmail but doesn't in hotmail!!! Link to comment https://forums.phpfreaks.com/topic/155000-automatic-reply-message/#findComment-815299 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.