From “meh” to “wow”: How to pimp your WordPress emails

Emails are often the first real point of contact between your website and your customers: contact form, order, new user account, password reset, comment… …

wpteam blog news

From “meh” to “wow”: How to pimp your WordPress emails

Emails are often the first real point of contact between your website and your customers: contact form, order, new user account, password reset, comment…
If these emails look generic, you’re losing trust and conversions.
The goal: clean HTML templates, clear typography, consistent branding (logo, colors), a personal tone, meaningful CTAs – and, of course, perfect deliverability.

Path 1: Plugins that deliver strong templates “out of the box”

If you want a professional result quickly, these solutions are proven and flexible:

  • Better Notifications for WP (BNFW): Replaces or extends core notifications (users, posts, comments, etc.) with WYSIWYG editing, shortcodes, role targeting, and add-ons. Ideal for editorial workflows and membership sites.
  • Notification (BracketSpace): A “Trigger → Carrier” builder for custom events. Send emails, webhooks, Slack messages, and more – extremely flexible, developer-friendly, with many triggers and merge tags.
  • WP HTML Mail (codemiq): Unified, responsive HTML template for all emails (Core + many form/shop plugins), editable via an intuitive editor – no coding required.

WooCommerce-specific:

  • Kadence WooCommerce Email Designer: Live preview, brand-consistent styling.
  • YayMail – WooCommerce Email Customizer: Drag & drop builder with many templates.

Pro tip: Combine a template plugin (e.g. WP HTML Mail) with a notification manager (BNFW or Notification). This way, you keep design and logic neatly separated and stay fully flexible.

Path 2: With just a few lines of code in your
functions.php

If you prefer a “lightweight” approach or only want to optimize specific parts, small filters/hooks are often enough. Always place them in your child theme or as a small MU plugin.

DISCLAIMER

You execute the code snippets voluntarily and at your own risk on your WordPress website. We have tested the code and it worked for us. Before using it on your live website, check in a staging environment or on a separate or locally hosted setup to ensure it works flawlessly for you. We at WPTeam assume no liability for any potential malfunctions of your WordPress website.

// functions.php (Child-Theme)
// 1) Absendername & -adresse setzen
add_filter('wp_mail_from', function() { return 'no-reply@deinedomain.de'; });
add_filter('wp_mail_from_name', function() { return 'Deine Marke'; });

// 2) HTML als Content-Type
add_filter('wp_mail_content_type', function() { return 'text/html; charset=UTF-8'; });

// Optional: Nach dem Versand wieder auf Text zurückstellen (falls andere Plugins es erwarten)
add_action('phpmailer_init', function($phpmailer) {
  if ($phpmailer->ContentType !== 'text/html') {
    $phpmailer->ContentType = 'text/html';
  }
});

This sets up your branding (From name / From email) and enables HTML. That’s the foundation for nice-looking templates. 2. Override default core notifications (example: new user account)

// WordPress >=5.7: 'wp_new_user_notification_email' filtert die Mail an den User
add_filter('wp_new_user_notification_email', function($wp_new_user_notification_email, $user, $blogname) {
  $subject = 'Willkommen bei ' . get_bloginfo('name') . ' – Dein Zugang ist bereit';
  
  ob_start(); ?>
  <table width="100%" cellpadding="0" cellspacing="0" role="presentation" style="font-family:Arial,sans-serif;">
    <tr>
      <td align="center" style="padding:24px;background:#072d40;color:#ffffff;">
        <img src="https://www.wpteam.io/wp-content/uploads/logo-wpteam.png" alt="WP Team" width="140" height="40" style="display:block;margin:0 auto 8px;">
        <h1 style="margin:0;font-size:22px;">Schön, dass Du da bist!</h1>
      </td>
    </tr>
    <tr>
      <td style="padding:24px;background:#ffffff;color:#1a1a1a;">
        <p>Hi <?php echo esc_html($user->display_name); ?>,</p>
        <p>Dein Konto wurde erfolgreich angelegt. Mit einem Klick kannst Du Dein Passwort setzen:</p>
        <p style="margin:24px 0;">
          <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" 
             style="display:inline-block;padding:12px 20px;text-decoration:none;border-radius:6px;background:#9fca28;color:#072d40;font-weight:bold;">
            Passwort festlegen
          </a>
        </p>
        <p>Beste Grüße<br>Dein WPTeam.io</p>
      </td>
    </tr>
    <tr>
      <td style="padding:16px;background:#f2f5f7;color:#6b7785;font-size:12px;">
        Diese E-Mail wurde automatisch gesendet. Antworten werden nicht gelesen.
      </td>
    </tr>
  </table>
  <?php
  $message = ob_get_clean();

  return [
    'to'      => $wp_new_user_notification_email['to'],
    'subject' => $subject,
    'message' => $message,
    'headers' => ['Content-Type: text/html; charset=UTF-8']
  ];
}, 10, 3);

Result: You replace the default plain-text email with a branded HTML email including a CTA button – completely without any additional plugin.
3. Slightly adjust WooCommerce emails (text snippets)

For small text changes, a simple filter is enough (for example, in the “Order Completed” email):

add_filter('woocommerce_email_footer_text', function($text) {
  return 'Danke für Deinen Einkauf bei <strong>WPTeam.io</strong> – Fragen? Antworte einfach auf diese E-Mail.';
});

For a full layout, it’s better to use Kadence or YayMail (live preview / drag & drop).
4. Unified header/footer snippet for all emails (quick template)

function wpteam_wrap_email($html_body, $title = 'Info von WPTeam.io') {
  return '
  <div style="background:#f5f7fa;padding:24px;">
    <div style="max-width:640px;margin:0 auto;background:#ffffff;border-radius:12px;overflow:hidden;">
      <div style="background:#072d40;color:#ffffff;padding:20px 24px;">
        <strong style="font-size:18px;">'.$title.'</strong>
      </div>
      <div style="padding:24px;color:#1a1a1a;line-height:1.5;">'.$html_body.'</div>
      <div style="background:#0b3650;color:#bcd4e6;font-size:12px;padding:16px 24px;">
        © '.date('Y').' WPTeam.io · Datenschutzkonform in Deutschland
      </div>
    </div>
  </div>';
}

add_filter('wp_mail', function($args) {
  // Nur umwickeln, wenn noch kein HTML-Layout erkennbar ist
  if (strpos($args['message'], '<table') === false && strpos($args['message'], '<div') === false) {
    $args['message'] = wpteam_wrap_email( wpautop( wp_kses_post( $args['message'] ) ), $args['subject'] );
    $args['headers'][] = 'Content-Type: text/html; charset=UTF-8';
  }
  return $args;
});

This gives you a simple, consistent layout for all emails – even when plugins only send plain text.

Path 3: With Bricks Builder & Bricksforge – no coding required

Bricks forms already provide a solid foundation: you can define HTML emails per form, insert fields via placeholders ({all_fields}, {field:name}), control subject/recipient, and design confirmation messages. For many use cases, that’s enough – quick, visual, and fully integrated into your Bricks workflow.

Bricksforge takes it a step further: through workflows/actions, you can process submissions conditionally (e.g., routing based on selection, double opt-in, attachments, additional CC/BCC, webhooks). This lets you build complex email automations directly within the Bricks ecosystem – without any custom code.

(Note: Specific action labels may vary depending on the version; the principle remains the same: Trigger → Conditions → “Send Email”/Webhook → Template with variables.)

Best practice setup for Bricks/Bricksforge:

  • Form email as HTML with clean inline CSS, logo (absolute URL), and clear CTAs.
  • Set Reply-To to the sender’s email address from the form so you can respond directly.
  • Fallback: If emails are critical (orders, leads), use a template plugin such as WP HTML Mail to maintain consistent design across the site.

Don’t forget deliverability

Beautiful emails are useless if they end up in spam. Use SMTP (e.g., through your provider or a dedicated service), set up SPF/DKIM/DMARC correctly, and always send from a real domain address (not “@gmail.com”). For WooCommerce, it’s worth using one or two dedicated transactional IPs from professional mail providers.

When to use code and when to use a plugin?

Code first if you only want to tweak core emails, prefer full control, and want to keep things lightweight.
Plugin first if you need to handle multiple templates, roles, triggers, or shop scenarios – BNFW/Notification for logic, WP HTML Mail for design, Kadence/YayMail for WooCommerce.