Can I customize the email 'container' html too?

Hi,

I’d like to update the layout of the emails to match the other emails that we send. What I’d need is a way to add a ‘wrapper’ around the email content, adding a logo, text-box and some elements like that. I couldn’t find this option in the Customize section of the admin - how would I do this?

Thanks!

2 Likes

Hi folks,

when re-reading this I realised that I could have been more clear with my request for help. Let me try again :slight_smile:

I’m aware that you can customise the text content of the emails, but I’d like to have a little more control over their layout. I’ve gone through all the admin options, thinking that maybe there’s an ‘email HTML template’ setting somewhere, but I haven’t been able to find it. Does such a thing exist and did I simply overlook it? Or would this require some custom coding/plugin?

Many thanks!

4 Likes

any followup on this? i would like to do the same thing…

Today our email only allows the customizations trough outlets, and not the concept of containers.

Maybe if you open the div with the customizations in a header outlet, and close in a footer outlet it can work, and be generic enough to help many users.

What do you think?

what are outlets? where can i modify them?

1 Like
1 Like

gotcha - i am looking for a way to customize ALL emails with our branding…

There’s a string with id user_notifications.header_instructions that can be used to add some html to the top of all HTML emails. It can be customized from Admin > Customize > Text Content. Here’s a simple example that would display a centered image (like a logo) with a red line above the email’s content:

<p style="text-align: center; border-bottom: 2px solid #B90B26; padding-bottom: 15px; text-align:center;">
<img src="...absolute-url-to-an-image..." width="90" height="66">
</p>
5 Likes

:thinking: to test how this works, I added the same lines as above with the absolute url to our logo, to this text content:

but nothing happened for our invitation emails,

  • is any additional work needed?
  • does this still work?

p.s.:

  1. the logo was already in digest emails (only digest), without any input in this text area.
  2. it works for the digest, if I put the html lines in this string: user_notifications.digest.custom.html.header
  3. the above text doesn’t work for the invitation emails. but it works for simple notifs.

update:

can I customize font of the email, using this way?

although fonts in the preview digest has been changed using the uploaded font, in the email, it hasn’t been changed.

also for notifications (and not digest) the codes are shown in the email!

I’ve used this code lines in the header:

<style type="text/css" media="screen, print">

    @font-face {
      font-family: "sans";
      src: url("absolute url to font address on our server");


    }
    
  body, body input,  body select, body textarea,  body button, p, a, strong, center, h6{
    font-family: "sans";}
    
  </style>

<p style="text-align: center; border-bottom: 2px solid #0071BC; padding-bottom: 15px; text-align:center;">
<img src="absolute url to the logo">
</p>

1 Like

sorry to bring this up, but my question again:

can one change the font of an email, by adding an html code in the text content?

It seems to work for the digest when I check the digest preview, but in the email inbox, the font is still not uploaded to the digest.

@awesomerobot is sketching out a plan for making email theming a bit better in the 2.4 release.

11 Likes

@codinghorror @awesomerobot are you still planning to include email theming in 2.4? I don’t see it in the 2.4 release topic.

We’re in the middle of moving our forum from bbpress to discourse. I had assumed emails could be themed and just learned they can’t. Really hoping to see it in 2.4…

Yep, @neil just recently implemented a way to customize the HTML/CSS used by our emails. If you’re on our tests-passed branch and have updated within the past week or so it’s available by visiting admin > customize > email style

6 Likes

Excellent! Thank you. We’ll probably wait for the 2.4 release to try it as we’re already pretty busy getting everything migrated to 2.3.

3 Likes