1. Home
  2. Docs
  3. Subscribe2
  4. Hooks, API & Customization
  5. s2_html_email s2_plain_email s2_digest_email

s2_html_email s2_plain_email s2_digest_email

These hooks allow the entire content of the email to be filter and amended immediately prior to sending. An example use for the ‘s2_html_email’ hook to add a stylesheet is below.

function my_s2html_filter($message) {
    if ( empty($message) ) { return; }
    list($first, $second) = explode('', $message, 2);
    $message = $first . '' . $second;
    return $message;
}
add_filter('s2_html_email', 'my_s2html_filter');

Was this article helpful to you? Yes No

How can we help?