Jump to content

Recommended Posts

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

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?

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>';

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.