Page 1 of 2

Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 12:40 pm
by kvaughn
I have the latest versin of s2Member running and for some reason the Administrative: New User Notification email is not being sent. Not sure where to start troubleshooting this, can someone please help? Thanks in advance for your assistance...

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:06 pm
by Eduan
Did you configure the email settings correctly?
If you're using PayPal go to WP Admin -> s2Member -> PayPal® Options and configure everything there.

Hope this helps. :)

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:17 pm
by kvaughn
Thanks for the quick reply Eduan. I'm not using PayPal but I think I have configured email correctly. I have entered everything into General Options > Email Configuration which seems to be pretty straight forward. I have used s2Member on previous sites and have had no issues.

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:33 pm
by Eduan
Have you got the Pro version? If so what do you use to receive payments (ccBill, ClickBank etc.)?

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:47 pm
by kvaughn
No, I am not running the pro version. There is no charge for the site, it's for a group of top Neurosurgeons and their patient discussions.

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:49 pm
by Eduan
Oh so it's free?

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:51 pm
by kvaughn
Yes. No charge. Free to use the sute for this group of surgeons.

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 1:56 pm
by Eduan
Okay, have you selected under WP Admin -> s2Member -> General Options -> Email Configuration -> New User Email Configuration that it does send the email?

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 2:03 pm
by kvaughn
Thanks... yes, the New User email does work. The new user does get their email notification with username and password but the admin does not (Administrative: New User Notification ).

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 2:12 pm
by Eduan

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 3:18 pm
by Eduan
Please tell me if it works.

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 3:41 pm
by kvaughn
I have a similar issue to that thread but actually the opposit... the user registration confirmation message does not send but the admin reg alert message does. I have tested the wp_mail() function and it does work. I placed the following code into a page, <?php wp_mail( "info@rrnmf.com", "wp mail test", "this is a test" ); ?>, and it sends mail fine.

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 5:00 pm
by kvaughn
Just upgraded to s2Member Pro hoping that would help. It did not... Any assistance with this would be greatty appreciated!

Re: Administrative: New User Notification not sending

PostPosted: October 17th, 2011, 7:17 pm
by Jason Caldwell
Thanks for reporting this important issue.

Please test again with s2Member v111017+, released today.
Changelog here ( there were some additional tweaks for edge cases that may help you )
http://wordpress.org/extend/plugins/s2member/changelog/

If the latest release does not help, please let me know.

Re: Administrative: New User Notification not sending

PostPosted: October 18th, 2011, 11:12 am
by kvaughn
Thanks Jason... I updated s2Member to v111017+ this morning and then tested. Unfortunately the admin new user notification is still not sending.

Re: Administrative: New User Notification not sending

PostPosted: October 18th, 2011, 5:17 pm
by Eduan
Have you tried something/anything that's in WP Admin -> s2Member -> API / Notifications?

Re: Administrative: New User Notification not sending

PostPosted: October 19th, 2011, 11:04 am
by kvaughn
Hmm, I believe this is to add notification urls if you use affiliate software, which we don't at this point.

Re: Administrative: New User Notification not sending

PostPosted: October 19th, 2011, 1:48 pm
by kvaughn
Any help with this would be greatly appreciated. This is a critical feature for the success of the site...

Re: Administrative: New User Notification not sending

PostPosted: October 20th, 2011, 3:08 pm
by Jason Caldwell
Eduan wrote:Have you tried something/anything that's in WP Admin -> s2Member -> API / Notifications?

I would recommend this also. Try adding email addresses for some of s2Member's API Notifications, and see if you get those. This may not resolve the issue that you're having, but it may shed light on some other underlying cause, perhaps. Worth a shot.

If nothing gives, please tell me what other plugins, if any, you're running in concert with s2Member. Please list them all, but mostly I'd like to see if you're running any other plugin that may be working in conflict with s2Member; or, if you're running any other plugin that might be altering the default behavior of the wp_mail() function in one way or another.

I would also take a look at your options here. When you configure s2Member to customize these email notifications, s2Member also makes it possible to customize your list of recipients. See: s2Member -> General Options -> Email Configuration -> New User Notification ( for Administrators ).

SNAG-0041.png

Also, if problems persist, please tell us the exact process that a User follows during registration on your site. If you are using other plugins to faciliate registration itself, it's possible that this email event is not getting called upon at all. Again, this is where s2Member's API Notifications via email may work to help you further understand what's actually happening behind-the-scene ( i.e. based on the emails you receive, or don't receive, during your tests ).

Re: Administrative: New User Notification not sending

PostPosted: October 20th, 2011, 5:13 pm
by kvaughn
Thanks Jason... I added the email adderss info@rrnmf.com to all API notifications. The following email registration alert was sent when there is a new registratn:

( s2Member / API Notification Email ) - Registration

Code: Select all
role: administrator
level: 4
ccaps:
auto_eot_time:
user_first_name: Generic
user_last_name: Admin
user_full_name: Generic Admin
user_email: xxxxxxx@fffenterprisess.com
user_login: xxxx
user_pass: xxxx
user_ip:
user_id: 73
newtopicnotificationemail: 1
credentials:
practice_affiliation:
cv0:
cv1:
cv2:
cv3:
cv4:
cv5:
cv6:
cv7:
cv8:
cv9:


Not sure what I can deduct from this but I thought I should let you know.

I am getting a list of plugins togenter.

Re: Administrative: New User Notification not sending

PostPosted: October 20th, 2011, 5:19 pm
by kvaughn
The Plugins we are running are as follows:

Code: Select all
bbPress
bbPress New Topic Notifications
bbPress Post Toolbar
bbP Signature
Executable PHP widget
GD bbPress Attachments
Global Hide/Remove Admin Bar Plugin
Login Logout
Members List
PHP Execution
s2Member Pro v111017
User Messages
Widget Context
WP Show IDs
WPtouch


The User Messages and Members List plugins were installed long after the email send issue was identified.

Re: Administrative: New User Notification not sending

PostPosted: October 20th, 2011, 6:12 pm
by Jason Caldwell
Thank you. I'm not finding anything in these plugins that would conflict with this functionality. And unfortunately, I've been unable to reproduce this far. If you would like to provide me with a Dashboard login and FTP access, I'll be happy to run diagnostics on your installation and provide a solution.

If possible, please submit this form with those details for me:
http://www.s2member.com/contact/

Re: Administrative: New User Notification not sending

PostPosted: October 20th, 2011, 6:31 pm
by Jason Caldwell
kvaughn wrote:Thanks... the contact form with login information has been submitted.

Thank you. Details received, investigating now.

Re: Administrative: New User Notification not sending

PostPosted: October 21st, 2011, 11:24 am
by bertranddory
Hi,

It seems I am running in the same issue. I have the latest versions of s2members and Pro. Any help would be appreciated!
Thanks

Re: Administrative: New User Notification not sending

PostPosted: October 21st, 2011, 5:04 pm
by Jason Caldwell
Investigation completed.

OK. It seems that some MTAs ( Mail Transfer Agents ), particularly QMail, do NOT accept the \n character when breaking apart multiline encoded subject lines. The \n newline character is NOT something a site owner adds, and this is NOT something that s2Member does either. It's something that the PHPMailer class, which powers the wp_mail() function does.

This compatibility issue may affect site owners who are hosted by a company that uses QMail to power email functionality on their server, or another MTA who might be picky in this regard. Right now, I'm only aware of QMail. If your hosting company uses QMail, your hosting company may have trouble sending mail processed by wp_mail(), when/if your email subject line is longer than usual ( i.e. requiring the \n newline character to break it apart during transmission of the email, to the recipient ).

For instance, in this investigation, the customized subject line was:
Code: Select all
[Rick’s Neuromuscular Friends Forum] New User Registration
PHPMailer, via the wp_mail() function, will encode this during transmission, to this:
Code: Select all
=?utf-8?Q?[Rick=E2=80=99s_Neuromuscular_Friends_Forum]_New_User_Registrat?=\n
=?utf-8?Q?ion?=
* Please note, this IS correct behavior. However, for whatever reason, some MTAs will NOT accept this, and the delivery of the email message will fail silently behind-the-scene.
See: http://code.google.com/p/textpattern/is ... tail?id=38


So, how can you work around this issue?

This is difficult for s2Member to do, because the code that affects this compatibility issue is NOT within s2Member's source code, and it's also NOT something s2Member can modify within WordPress itself, given technical challenges related to the way it's implemented by PHPMailer.

Until we discover a way for s2Member to dynamically work around this issue, here are some things you can do yourself to overcome this compatibility issue, when/if it's affecting you.


Solution option #1.
Try installing an SMTP mail plugin for WordPress.
See: http://wordpress.org/extend/plugins/wp-mail-smtp/


Or, solution option #2.
When/if you configure s2Member to handle New User Notifications for your installation of WordPress, you have the option of modifying the subject line used in these emails.

Try to reduce the size of your customized subject line; and test again, until your subject line is short enough NOT to require line breaks during email transmission.

How long is too long? Well, this also is difficult to pinpoint, because the length is examined during transmission of the email, and this happens *after* encoding occurs. Thus, depending on the number of special characters in your email message, it could wind up long enough to require newlines during transmission. The best advice I can give, is to avoid the use of special characters all together, and try to keep your subject under 55 chars in length. This should resolve the compatibility issue for you.


Or, solution option #3.
Move to a different hosting provider. Perhaps one that uses the most common MTA, which is Sendmail; or one that uses Exim, which also seems to be perfectly compatible with the PHPMailer class.


Or, solution option #4.
Open this file from your installation of WordPress.
/wp-includes/class-phpmailer.php at line #644 find this function.
Code: Select all
protected function MailSend
Find all occurrences of this code snippet inside the MailSend function:
Code: Select all
$this->EncodeHeader($this->SecureHeader($this->Subject)) 
Wrap all instances with this:
Code: Select all
str_replace("\n", "\r", $this->EncodeHeader($this->SecureHeader($this->Subject))) 
*This forces \r in encoded multiline subjects, instead of the default \n.
In my tests, this fixes the issue on most incompatible MTAs.