Title: WPBE / WP Events
Last modified: August 21, 2016

---

# WPBE / WP Events

 *  Resolved [geoffroycochard](https://wordpress.org/support/users/geoffroycochard/)
 * (@geoffroycochard)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/wpbe-wp-events/)
 * Hie,
 * I use WPBE to send HTML Email with templating in my WordPress and Contact form
   7 plugin.
    I manage event with [WP Events](http://wp-events-plugin.com) with 
   send HTML Parameters / use wp_mail so it put content_type to text/html and when
   hook action WPBE hook action phpmailer_init plays and method send_content_type
 *     ```
       /**
       		 * Always set content type to HTML
       		 *
       		 * @since 0.1
       		 * @param string $content_type
       		 * @return string $content_type
       		 */
       		function set_content_type( $content_type ) {
       			// Only convert if the message is text/plain and the template is ok
       			if ( $content_type == 'text/plain' && $this->check_template() === true ) {
       				$this->send_as_html = true;
        				return $content_type = 'text/html';
       			} else {
       				$this->send_as_html = false;
       			}
       			return $content_type;
       		}
       ```
   
 * private var send_as_html go to false, so no html template…
 * I have to force send plain text email to event manager to let WPBE play with 
   correct content type..
    Is the normal operation ? Why do not force directly send_as_html
   to true ? I don’t see all consequences …
 * It just a feedback of an happy WPBE user 🙂
 * Greats
 * [http://wordpress.org/plugins/wp-better-emails/](http://wordpress.org/plugins/wp-better-emails/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Nicolas Lemoine](https://wordpress.org/support/users/nlemoine/)
 * (@nlemoine)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/wpbe-wp-events/#post-4156952)
 * Salut Geoffroy,
 * Yes it’s the right way to behave. I decided to avoid wrapping the message with
   the HTML template when the format is already set to “text/html” because it could
   result in a mess if the message already have a template (set by another plugin
   for example).
    I’ll maybe add an option to let users choose if they want to skip
   this behavior and wrap with HTML anyway.

Viewing 1 replies (of 1 total)

The topic ‘WPBE / WP Events’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-better-emails_f6f6f6.svg)
 * [WP Better Emails](https://wordpress.org/plugins/wp-better-emails/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-better-emails/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-better-emails/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-better-emails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-better-emails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-better-emails/reviews/)

## Tags

 * [Better](https://wordpress.org/support/topic-tag/better/)
 * [email](https://wordpress.org/support/topic-tag/email/)
 * [event](https://wordpress.org/support/topic-tag/event/)
 * [wp_email](https://wordpress.org/support/topic-tag/wp_email/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nicolas Lemoine](https://wordpress.org/support/users/nlemoine/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/wpbe-wp-events/#post-4156952)
 * Status: resolved