Email Users v4.6.9-beta-1 available

I have just posted beta-1 of Email  Users v4.6.9. This build addresses an issue reported with template replacements not working correctly when using sender overrides.  Additionally, I have added support for blog and author template replacements in user and group emails.

Please report any issues you encounter.

Email Users Beta (24333 downloads )

Email Users v4.6.6-beta-3 available

Over lunch I posted beta-3 of Email Users v4.6.6.  This build addresses an issue with User Groups integration when using a non-English version of WordPress.  A value embedded in the form was translated which the form processing logic wasn’t handling correctly.  This problem also could have manifested itself if a group name contained a hyphen (dash) character.

Email Users Beta (24333 downloads )

Email Users v4.6.6-beta-2 available

Yesterday on my flight to Phoenix I implemented a feature which was recently requested to use the To field for the recipient address when the BCC limit is set to 1.  There is a new choice in the BCC Limit option on the Settings page:

EU_SS_35

 

If  you’d like to test this new feature, download this beta build and report any issues you encounter.  It will work with both Post/Page notifications as well as group emails.  The only limitation is when used, the user’s email address will be placed in the To header without their display name.

Email Users Beta (24333 downloads )

Email Users v4.6.6-beta-1 available

This afternoon I posted beta-1 of Email Users v4.6.6.  This build addresses an issue reported on the Email Users support forum.  The user reporting the issue was running into a feature that was actually designed into Email Users – the ability to email a user regardless of their Mass Email and Notification settings.

Based on the user’s use use case, I can understand the desire to prevent certain types of users from appearing in the User Recipient List.  So I have added a new option to the settings page which will prevent users who do not have a role on the web site from appearing in the Recipient List.

EU_SS_30

EU_SS_31

EU_SS_32

EU_SS_33

EU_SS_34Please report any issues with this new functionality ASAP and I will try to address them quickly.

Email Users Beta (24333 downloads )

Email Users v4.6.3 released

I finally had a chance to do some final testing of Email Users v4.6.3. To the best of my knowledge there are no outstanding issues so I have released it today.  You can find the update on your WordPress Dashboard or in the WordPress Plugin Repository.

Bug Fixes and Enhancements

  1. Fixed several strings which were not properly set up for language translation.
  2. Re-added French translation file as it had gotten corrupted somehow and wouldn’t load in WordPress.
  3. Added Dutch translation support (thank you Bart van Strien).
  4. Fixed bug where sites with large numbers of users would exhaust memory.
  5. Updated Spanish translation (thank you Ponc J. Llaneras)
  6. Added additional options for BCC limit.
  7. Fixed several CSS bugs on Settings page.
  8. Initial implementation of Paid Memeberships Pro integration.

Email-Users v4.6.3-beta-11 available

I have just posted beta-11 of Email Users v4.6.3.  This beta version has quite a bit in it, new functionality and bug fixes:

  • CSS fixes to the settings page so the Editor boxes don’t over flow into the right hand column.
  • Integration support for the Paid Memeberships Pro plugin.
  • Language file updates.
  • Empty User Groups from the Groups plugin are no longer displayed when sending group messages or notifications.

Please do some testing with this build, I would like to release it fairly soon.  I have limited knowledge of Paid Memberships Pro so it could use some testing.  My experience with PMP is it is pretty fragile, I had to mess with my WordPress database just to get users assigned to PMP groups.

Email Users Beta (24333 downloads )

Email Users v4.6.3-beta-9 available

Update:  Around noon EST I updated the build to beta-10 to fix another bug.

This morning I posed beta-9 of the upcoming Email Users v4.6.3 release.  This build includes an updated Spanish translation as well as several new options for the BCC Limit setting targeted at sites with very large numbers of users (e.g. 4k, 13k, etc.).

This build also moves some debug code I have been using to chase down the memory issue under the control of the Email Users Debug setting (which is on the plugin settings page – Dashboard->Settings->Email Users).  I have found this code to be really useful chasing down this odd memory problem however I don’t want it running all the time so putting it under the control of the debug setting makes sense.  When debug is enabled, if you choose the “Send to Users” menu (Dashboard->Email Users->Send to Users) and examine the source HTML code for the page, you will find a section of code which looks similar to this:

<pre id="line1">				<select id="<a>send_users</a>" name="<a>send_users[]</a>" size="<a>8</a>" style="<a>width: 654px; height: 250px;</a>" multiple="<a>multiple</a>" >
				<!-- email-users.php::1010 -->
<!-- email-users.php::1058 -->
<!-- email-users.php::1059 -->
<!--
Array
(
    [total_users] => 805
    [avail_roles] => Array
        (
            [administrator] => 1
            [contributor] => 4
            [editor] => 2
            [subscriber] => 798
        )

)
 -->
<!-- email-users.php::1061 -->
<!--
Array
(
    [exclude] => 1
    [fields] => Array
        (
            [0] => ID
            [1] => display_name
        )

    [offset] => 0
    [number] => 500
)
 -->
<!-- email-users.php::1063 -->
<!-- email-users.php::1082  Query #1  Memory Usage:  20.5M -->
<!-- email-users.php::1082  Query #2  Memory Usage:  20.5M -->
<!--
805 -->
<!-- email-users.php::1116 -->
					<option value="<a>308</a>" ></pre>

This sort of information is tremendously helpful when chasing down odd behavior.

I am hoping to get a couple more translation updates before I do the v4.6.3 release along with some testing from a couple of sites with large user counts.  In the meantime, you can download the latest beta version here.

Email Users Beta (24333 downloads )

Email-Users v4.6.3-beta-8 now available

I have just uploaded beta-8 of Email Users v4.6.3.  This build addresses an unusual out of memory situations which affected sites with very large numbers of users.  You can find a detailed write up of the problem here.

The change s required to address this problem are pretty substantial so I would appreciate any testing people can do, I don’t want to break anyone’s email system!

Email Users Beta (24333 downloads )

Chasing down Email-Users out of memory issues

For the past couple of days I have been looking at two sites which were experiencing an issue with Email Users where any of the pages on the Dashboard which presents a list of recipients was incomplete.  Looking closer at the pages, PHP was crashing which resulted in an incomplete page.  One of the sites had another clue, it reported a request for memory which could not be granted.

Both users provided me access where I could upload a debug version of Email-Users.  While not an ideal debug environment, I am grateful for the trust and access both users provided as I would have not been able to chase this bug down in my own development environment.

I was able to narrow the problem down to a call to get_users() which is a standard WordPress API function.  Because Email Users has been around a while, it still contains some code which was necessary in older versions of WordPress and the arguments passed to get_users() included the ‘all_with_meta’ parameter which was the only way to retrieve the first and last name of a user prior to the magic methods which were introduced for get_users() in WordPress 3.x.  The magic methods remove the need for the ‘all_with_meta’ parameter however the plugin was never updated because it wasn’t broken.

In the process of chasing down this memory problem I added some code to partition the get_users() query into blocks of 500 users and I could watch the memory usage increase with each query.  This would continue until memory was exhausted at which time PHP would terminate ungracefully and the partial page would be rendered.

An email to the wp-hackers mailing list helped me understand how much data was being cached by calling get_users() with the ‘all_with_meta’ parameter and I realized I needed to find a different solution as what I was doing wouldn’t scale.

I had encountered the get_users() magic methods previously and I realized that I no longer needed to call get_users() with the ‘all_with_meta’ parameter so I removed it and did some testing and sure enough, I was able to successfully run on both sites without any issues.  Memory usage on the site with 13K users topped out at 47M, well under the 256M maximum defined by WordPress.

In the current beta version (4.6.3-beta-8) there is still some debug code in place to monitor memory usage.  If you look at the page source you will find something like this:

<pre id="line1"><!-- email-users.php::1091  Query #1  Memory Usage:  34.5M -->
<!-- email-users.php::1091  Query #2  Memory Usage:  34.75M -->
<!-- email-users.php::1091  Query #3  Memory Usage:  35.25M -->
<!-- email-users.php::1091  Query #4  Memory Usage:  35.75M -->
<!-- email-users.php::1091  Query #5  Memory Usage:  36.5M -->
<!-- email-users.php::1091  Query #6  Memory Usage:  37M -->
<!-- email-users.php::1091  Query #7  Memory Usage:  37.5M -->
<!-- email-users.php::1091  Query #8  Memory Usage:  37.75M -->
<!-- email-users.php::1091  Query #9  Memory Usage:  38.5M -->
<!-- email-users.php::1091  Query #10  Memory Usage:  39M -->
<!-- email-users.php::1091  Query #11  Memory Usage:  39.5M -->
<!-- email-users.php::1091  Query #12  Memory Usage:  40M -->
<!-- email-users.php::1091  Query #13  Memory Usage:  40.25M -->
<!-- email-users.php::1091  Query #14  Memory Usage:  40.75M -->
<!-- email-users.php::1091  Query #15  Memory Usage:  41.25M -->
<!-- email-users.php::1091  Query #16  Memory Usage:  41.5M -->
<!-- email-users.php::1091  Query #17  Memory Usage:  42.5M -->
<!-- email-users.php::1091  Query #18  Memory Usage:  43M -->
<!-- email-users.php::1091  Query #19  Memory Usage:  43.5M -->
<!-- email-users.php::1091  Query #20  Memory Usage:  44M -->
<!-- email-users.php::1091  Query #21  Memory Usage:  44.25M -->
<!-- email-users.php::1091  Query #22  Memory Usage:  44.75M -->
<!-- email-users.php::1091  Query #23  Memory Usage:  45.25M -->
<!-- email-users.php::1091  Query #24  Memory Usage:  45.75M -->
<!-- email-users.php::1091  Query #25  Memory Usage:  46M -->
<!-- email-users.php::1091  Query #26  Memory Usage:  46.5M -->
<!-- email-users.php::1091  Query #27  Memory Usage:  47M --></pre>

I need to do some additional testing but based on these two sites now working, I am bullish on this solution to this unusual problem.