Support » Plugin: WP-Members Membership Plugin » Filtering Emails with "wpmem_email_newreg"

  • Resolved widecast


    Hi there,

    Awesome plugin. I love that there are so many hooks and filters. I’m having a problem with filtering emails.

    I’m trying to add an image to the top of the emails like so:

    //wp-members customize emails
    function my_email_filter( $email_content )
    	// the content of the email comes to
    	// the filter in the parameter $email_content
    	// you can do whatever you want to it here:
    	// add to it:
    	$email_content = '<img src="">'
    		. $email_content;
    	// or you could use something like php's
    	// str_replace to filter the string and
    	// add/remove content, etc.
    	// whatever you do, you need to return
    	// the filtered result:
    	return $email_content;
    add_filter( 'wpmem_email_newreg', 'my_email_filter' );

    However the registration emails aren’t being modified. I’m running the latest version of WP-Members.

    Any ideas what might be going wrong?

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chad Butler


    wp_mail by default sends emails as plain text. You can’t add an image unless the email format is HTML.

    Hey Chad,

    Thanks for the info. I didn’t know that.

    I’m still having the same problem even when I replace the image with arbitrary text. Not getting appended.

    Any other possible reasons for this that I should explore?


    Plugin Author Chad Butler


    Is it possible that you are using the wrong email filter? If you have registration moderation turned on, you would need to use the wpmem_email_newmod filter.

    There is a different filter hook for each of the different emails that the plugin would send. There is a list here under “Email”.

    That must be it! I do have registration moderation turned on.

    I overlooked the possibility that there was a different filter for the moderation emails. Thanks for the nudge in the right direction.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filtering Emails with "wpmem_email_newreg"’ is closed to new replies.