After much delay did I upgrade one of my sites to the latest core and modules.

Much to my surprise and dismay are the mails I get from webform submissions now wrapped inside two tables:
<TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top align=middle>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD class=htmlmail-body vAlign=top>
...

I discovered that this module is now incorporating a htmlmail.tpl.php file which contains that table.

Is there anything I don't see, that would speek against changing it to something like this:
...
<body class="htmlmail">
  <?php if ($header): ?>
    <p class="htmlmail-header">
    <?php print $header; ?>
  <?php endif; ?>
  <p class="htmlmail-body">
  <?php print $body; ?>
  <?php if ($footer): ?>
    <p class="htmlmail-footer">
    <?php print $footer; ?>
  <?php endif; ?>
</body>
...

Comments

Christopher Herberte’s picture

The beauty of theme templates is that you can copy it to your theme directory and put anything you want in it.

That being said: I would like to know what sorts of problems tables are creating. The reason for using tables was as per suggestion, i made reference to these recommendations within the template. I would consider changing the tables to divs for the default / example.

Christopher Herberte’s picture

Leaving this issue open for additional feedback.

spade’s picture

First, let me say thanks for providing this module and continuing to support it.

The issue I had, might be unusual, but troublesome never the less.

I developed a procedure to process the submissions I get from webform entries. We used to just grab the whole content of the resulting email and paste it into Word. Everything worked fine until I upgraded and recieved the content wrapped in those two tables. Of course Word recognises the tables and displays the content different than without. So I had to edit every submission and remove the tables from the HTML in order to process the submission, until I figured out to modify the template. Now others con continue to process the submission and I have less to do on that end ;-)

I think just wrapping the content in divs would be more desireable and have no such side effects.

Thanks for paying attention to this.

Kind regards,

Frank

Christopher Herberte’s picture

Status: Active » Closed (fixed)

For future reference, because clients like Gmail and Outlook 2007 have poor support for divs and div css attributes, you need tables as the framework of your email.
I know, it sucks!