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.

New User Email Message question (Again)

Home Forums Community Forum New User Email Message question (Again)

This topic contains 5 replies, has 3 voices. Last updated by  Bruce 3 years, 10 months ago.

Topic Author Topic
Posted: Saturday Feb 16th, 2013 at 2:52 am #41931

I posted this before but I never received an answer. So I repost in the hope that somebody has a solution for me.

My site has members from different countries… read -> different languages.
I thus wanted to customize the New User Email Message to display in the language of the user. I tried this:

$lang = get_user_field("_taal_")

if ($lang=="NL")
$msg("Hallo %%user_first_name%%," .
,"", .
"Bedankt voor je inschrijving bij Reiki magazine Online", .
"Dit is je gebruikersinformatie:", .
"Gebruikersnaam: %%user_login%%", .
"Password: %%user_pass%%", .
"Geregistreerd emailadres: %%user_email%%", .
"Je kan inloggen op de startpagina rechtsboven.", .
"Ik hoop het uiteraard niet, maar mocht je ooit je abonnement willen opzeggen dan doe je dat nadat je ingelogd bent.", .
"Ga naar je profiel pagina. Daar kom je door eerst in te loggen en dan te kiezen voor "Edit my profile"", .
"Onderaan staat een knop 'Unsubscribe'", .
"Klik daarop. Hiermee worden automatische vervolgbetalingen stopgezet. Je abonnement wordt stopgezet nadat je huidige abonnementsperiode is verlopen." );

$msg("Hello %%user_first_name%%,", .
"Thank you for subscribing to Reiki Magazine Online.", .
"", .
"Your Username/Password:", .
"Username: %%user_login%%", .
"Password: %%user_pass%%", .
"", .
"You can log in at the homepage (right upper corner).", .
"In case you might want to stop your subscription at some time in future you can do so once you are logged in.", .
"The membership login box at the top-right corner changes from membership login to "My Profile Summary" Click on "Edit my profile".", .
"At the bottom of the page you see a button "unsubscribe". Click on that to unsubscribe from Reiki Magazine Online.", .
"Any recurring payments will stop and your subscription will expire after the current timeslot of you subscription.");
$bericht = ""
   $bericht = $bericht + $msg[$x] + &quot;<br>";
echo $bericht

This is not working at all. I get the full php code in the message.
So the question is, is there a way to create a message depending on the language of the new user?
FYI, I do have a custom field “_taal_” that displays the language of choice.
For now I stick to repeating the message in 3 different languages. (Dutch, German, English) in one mail.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Monday Feb 18th, 2013 at 5:05 pm #42344
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

I don’t see anything in your code that actually assigns those customizations to anything s2Member-related. I see your translations, but those need to be assigned to values that s2Member® uses please.

Please create this directory and file:
(NOTE: these are MUST USE plugins, see:
(See also:

Posted: Tuesday Feb 19th, 2013 at 1:19 am #42420

I have come across these mu plugins before (in my desire to be able to translate a site, based on the language a visitor speaks) and I know they are loaded the moment I open the site and that is NOT what I want.
As I described before, I have users form different countries like the Netherlands, Germany, England, USA, Russia, France etc.
Once they subscribe I determine their language by a custom field in the profile.
Based on that I want to send out an eMail to them in their own language.
The MU plugins are not capable of doing that.

I looked around for a plugin that could do that for me but there is no such thing.

Posted: Thursday Feb 21st, 2013 at 1:43 am #42648
Username: Bruce
Staff Member

See: s2Member® Unified Changelog » v130220

(s2Member/s2Member Pro) Feature Enhancement/Emails (Issue #30) Adding support for PHP tags in the following emails: New User Notification, Administrative New User Notification, Signup Confirmation Email, Specific Post/Page Confirmation Email. See the relevant sections in your Dashboard for further details. Such as: s2Member® -› General Options -› Email Configuration and s2Member® -› PayPal® Options -› Signup Confirmation Email.

You should be able to use the code from your original post in the email field with the latest version of s2Member. Let us know if problems persist. :-)

Posted: Thursday Feb 21st, 2013 at 4:33 am #42686

Sorry Bruce,

I tried it but it’s not working.
Even the admin new user notification did not come through.
Maybe I am doing something wrong. Is there a working example I can study on?

*** One day later ***
Testing with the latest version.
I now do get a new user notification for the admin when I use the code I showed in this thread. That is at least a little improvement.
However, the new user still doesn’t receive the mail.
Once again, is there a working example of how to use this? My code obviously is not working.


Posted: Friday Feb 22nd, 2013 at 9:22 pm #42881
Username: Bruce
Staff Member

Once again, is there a working example of how to use this? My code obviously is not working.

No, unfortunately we do not have any examples as of yet. We’ve just got this feature released. I’ll put in a request to have this put up.

In the meantime, could you ensure that this is a problem with the code in your form, rather than just an issue with wp_mail here? You may want to try putting just normal data here and running another test. If the mail does go through, you may just have a parse error somewhere in your code causing the email to not send.

Viewing 5 replies - 1 through 5 (of 5 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.