latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Better solutions for HTML in Welcome Email?

Home Forums Community Forum Better solutions for HTML in Welcome Email?

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 4 years, 3 months ago.

Topic Author Topic
Posted: Thursday Oct 4th, 2012 at 10:38 pm #27520

Hello!

Issue:

I found some advice on how to send the welcome emails in HTML format. But the solutions seems to be prone to be erase everytime I upgrade s2member.

Is there a way to use a hack or hook to make this not be erased? I’d want registration welcome email AND payment emails to be HTML formatted.

Thanks!
Angie

Solution From Previous Post

This is what I found in this post:

http://www.s2member.com/forums/topic/html-in-welcome-emails/

File: s2member\includes\classes\email-configs.inc.php line 242

Change this:

c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($user->user_email, $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8") . c_ws_plugin__s2member_email_configs::email_config_release ();

To This: (notice the change in “Content-Type: text/html”)

c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($user->user_email, $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/html; charset=utf-8") . c_ws_plugin__s2member_email_configs::email_config_release ();

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Oct 4th, 2012 at 11:15 pm #27522
Bruce
Username: Bruce
Staff Member

Hi Angie,

You can stop this from happening by putting the edited version of the class into a Must Use Plugin. s2Member has a check to see if the class is already created both within the class autoloader, and within each class file itself for this purpose. You can create the /wp-content/mu-plugins/ directory if you do not and create a file called s2hack_email-configs_overwrite.php to house this.

Keep an eye out for changes to the email-configs.inc.php file in future versions however. If this file does change you’ll want to adapt this file to the new setup. :)

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.