Email configuration


I’d like some help configuring email in s2member.

It seems that the information I’m entering into General options > Email configuration is controlling the default emails sent out by my site.

To provide some context, I run a single wp install but use domain aliases to run different domains on the same website. In other words I use one set of plugins and settings for multiple sites (but not multisite).

This works in most areas of the platform, though when a default email is sent, s2member overrides the from name / from email to those set in General options > Email configuration and so people that sign up to different sites are all receiving emails from the same details set by s2member.

In my limited understanding I would either like to:

  1. Switch off s2member’s override of the default wp from name and wp from address (and then I can add some code to functions.php or similar to dynamically change these)

  2. Be able to put something in the fields that allows me to dynamically populate the ‘email from name’ and ‘email from address’ fields based on which alias domain is being used i.e. %%siteurl%% or something that allows me to vary the data that goes in that field.

Would really appreciate your help. Hope this makes sense!


Hi Rich.

I see. Interesting setup.

I think you’d need to look for a filter to customize your emails…

Look in this file… s2member/src/includes/classes/ On line 342 particularly.

I think that the ws_plugin__s2member_welcome_email_msg filter you can use to replace your siteurl, for example…

And the “from” fields are in the s2 globals (reg_email_from_name and reg_email_from_email) but there’s no filter for those, so you can use an action hook earlier to update those values… Could be ws_plugin__s2member_before_new_user_notification.

I hope that helps. :slight_smile: