PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

HTML in Custom Emails?

s2Member Plugin. A Membership plugin for WordPress®.

HTML in Custom Emails?

Postby bitofgrace » September 20th, 2011, 11:25 am

Hi again :)
Was attempting to customize the emails that s2 generates upon payment and registration to match our site's generated emails. (graphically)
The result coming through is raw HTML. : / What do i need to or can i do so that the emails maintain HTML table formatting?

-grace
User avatar
bitofgrace
Registered User
Registered User
 
Posts: 64
Joined: September 8, 2011

Re: HTML in Custom Emails?

Postby Cristián Lávaque » September 20th, 2011, 6:16 pm

I believe the emails will be sent in plain text, I don't know if HTML emails are supported. I'll ask Jason.
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: HTML in Custom Emails?

Postby Jason Caldwell » September 20th, 2011, 6:28 pm

Yes, all emails processed by s2Member are sent with a text/plain Content-Type header. You can Filter this with WordPress, but I don't advise doing so, because it may create problems ( i.e. this affects all instances of the wp_mail function ), not good.

Create this directory and file:
/wp-content/mu-plugins/wp-mail.php
Code: Select all
<?php
add_filter
("wp_mail_content_type", "wp_mail_content_type_force");
    function wp_mail_content_type_force(){ return "text/html"; }
?>

@TODO: I'll see what we can do in a future release to make HTML emails possible w/s2Member only.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: HTML in Custom Emails?

Postby bitofgrace » September 20th, 2011, 6:33 pm

Thank you for the help - for now will style the text somewhat like Paypal's receipt emails then :)

-grace
User avatar
bitofgrace
Registered User
Registered User
 
Posts: 64
Joined: September 8, 2011

Re: HTML in Custom Emails?

Postby ffemtkl » September 21st, 2011, 7:45 am

Just an FYI... HTML (custom text?) emails will be supported in WP 3.3 (at least that is the plan).

see: http://core.trac.wordpress.org/ticket/18493
User avatar
ffemtkl
Registered User
Registered User
 
Posts: 20
Joined: June 13, 2011
Location: Jerusalem, Israel

Re: HTML in Custom Emails?

Postby Jason Caldwell » September 27th, 2011, 12:52 pm

Good to know. Thanks for sharing this!
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron