Google Forms v0.58-beta-1 available

This afternoon I posted a beta release of v0.58 to address a problem reported in the WordPress Support Forum.  The problem arises when the answer for a checkbox or radio button contains the apostrophe character.  This releases fixes the problem but needs testing.  I did some testing using the form which was having UTF-8 issues and all seems ok.

Google Forms Beta (7987 downloads )

Email-Users Debugging – why don’t my users receive email?

Periodically users post questions in the Email-Users support forum wondering why their users don’t receive email messages when they expect them to.  There are many reasons why users don’t receive email, some are within the control of Email-Users but many are not.

Email-Users User Settings

Email-Users is based on two user settings (which appear on the user’s profile page):

  1. Receive post or page notification emails
  2. Receive emails sent to multiple recipients

EU_SS_14Email-Users has a plugin level setting which allows end users to modify their own settings which is enabled by default.  When it is disabled, only users with the proper permissions can modify user settings related to Email-Users.  No matter how the user has their settings configured, a user can always receive an email when they are the only recipient.

EU_SS_15In Email-Users v4.5.2 a new Dashboard Widget has been added which reports the number of users who have their settings configured to receive each type of email.  This information also appears on the Plugin Settings Page and should either of the types of email not have any users set to receive email, a warning message is displayed at the top of the screen.

EU_SS_17Changing the Email-Users settings for a large number of users can be accomplished from the User Setting menu.  By selecting the desired Users, Notifications and Mass Email can be enabled or disabled for a large number of users at one time.  For a site that has a large number of users, the number of users which appear on each page can be changed on the Settings Page.

Test Email

Before sending out notifications or messages, it is important to validate the underlying WordPress email system is working.  On the Plugin Settings page there is the ability to send a Test Message.

EU_SS_18

Email-Users utilizes WordPress’ wp_mail() function to send email.  It does not interact with the OS or PHP mail functions directly.  By using wp_mail(), which can be overridden by other WordPress plugins, Email-Users can work with different server configurations and email infrastructure.

If you don’t receive the test message then you may have a problem with your underlying WordPress email system.  Do you receive email for user registration and comments?  If not, there is something wrong which is out of the scope of Email-Users.

On some servers plugins such as WP-Mail-SMTP (this is just an example, there are others) can be used in situations where email is being sent but isn’t being received.

There is no point in trying to send Notifications or Mass Emails if the Test Message isn’t working.

BCC Limits

Some servers limit the number of email addresses which can appear in the BCC header of an email message.  Email-Users has a setting to control the number of addresses which appear in the BCC field.  If Email-Users is working for a small number of users but isn’t working for a larger number (e.g. all of your users) , you may be dealing with a BCC limit.

If you are able to send email to 3-5 users by selecting them from the list of users, I would next try sending a message to about 10 users and see if that works.

The sending logic is only different when 1 user is selected. Anytime more than one user is selected (2, 10, 37, 67, 1000, etc.), the same logic path through the code is used.

The only thing that is different is how many emails are sent and that is based on the BCC limit setting. If there is no limit, which is the default, it sends one email with all recipients on the BCC line. For any other setting, it will send some number of emails, depending on the BCC limit. If the BCC limit was set to 30 and you had 67 recipients, it would send 3 emails: The first 30, the second 30, and the final 7.

Advanced Debugging

In some situations you may want to examine what Email-Users is doing in gory detail.  For development purposes Email-Users has a DEBUG mode.  When in debug mode Email-Users will log quite a bit of information to the PHP error console using error_log() including the actual email headers it generates.  It can be very useful to see the actual mail headers to ensure the expected recipients are actually included.

Because gaining access to the contents of the error_log() differs from web host to web host, I recommend using a WordPress debugging capability to capture it in the site’s /wp-content folder.  By setting WP_DEBUG_LOG to true in your wp-config.php file, you can easily access the resulting debug.log file.  On my development machine I use the following set up in my wp-config.php file:

define('WP_DEBUG', true); // or false
if (WP_DEBUG) {
 define('WP_DEBUG_LOG', true);
 ini_set('display_errors', 'on');
 error_reporting(E_STRICT | E_ALL);
 define('SAVEQUERIES', true);
 define('SCRIPT_DEBUG', true);
 error_log('Debug On!') ;
}

You would not want this on a production server but to temporarily chase down a problem, it works well.  Unfortunately some plugins issue a lot of notices or warnings so you can run into the “Headers already sent” problem so you may want to tweak the above settings to meet your needs.

Once your WordPress debugging settings are tuned to your liking, you need to enable Debug for Email-Users.  Doing this requires manually editing one of the plugin files.

On or about line 46 of the email-users.php file you will find a line of code which reads:

define( ‘MAILUSERS_DEBUG’, false);

You need to change the code such that it reads:

define( ‘MAILUSERS_DEBUG’, true);

After you have made this change Email-Users will output information to the error_log.

In the image below you can see a series of email headers each with 10 email addresses in the BCC field (BCC limit is set to 10).

EU_SS_19

If the information in the error_log is what is expected then there is little, if anything which can be done from Email-Users.  At this point you will need to figure out where the email is routing to and where it isn’t which is beyond the scope of the Email-Users plugin.

Anecdote

I was using Email-Users on our local Swim Team’s web site and heard from a number of parents that they weren’t receiving emails.  I noticed that all of the reports were coming from families with RoadRunner email addresses.  It turned out that Time Warner had blacklisted our Swim Team’s domain.  By filling out a form with TWC and verifying some information, we were able to get white listed but for several weeks I wasn’t sure how to resolve it.

Email-Users 4.5.2 released

This morning (updated) afternoon I released a minor update, v4.5.2 (updated) v4.5.3, of Email-Users.  This update adds new information on the Dashboard to help the WordPress Admin ensure that the number of users they expect to receive email is correct.

There is a new Dashboard Widget and an updated Settings Page which note how many users will receive each type of email.  If no users will receive notifications or mass emails, a warning message will be displayed at the top of the Settings Page.

Email Users Settings Page

In addition to the new Dashboard Widget for Email Users, I am adding some additional information to the Settings Page to indicate when User Setttings aren’t in a state the admin expects them to be.

When visiting the Settings Page, if either the number of users who receive post or page notifications OR mass email is equal to zero, a message will appear at the top of the page.

EU_SS_15

 

In addition to the box pictured above, the current number of users who receive each type of email is now displayed in a small box at the top of the right hand column above the Donation box.

EU_SS_16

 

Hopefully these improvements will help people chase down situations when users aren’t receiving email when they are expected to.

Email Users Dashboard Widget

I’ve gotten a rash of questions about Email Users lately.  Most of the questions revolve around users not receiving email messages.  In some cases the users don’t receive email messages because their settings aren’t set correctly.  I am in the process of adding some information to Email Users to make it obvious when this is the case.  The first thing I am working on is a Dashboard Widget.

EU_SS_13

 

EU_SS_14

Should anything else appear on this widget?

WordPress Google Form v0.57 released

This afternoon I released a minor update to WordPress Google Form. This update, v0.57 addresses a bug which prevented translation of the “What is” phrase used for CAPTCHA support.  It also includes updated language support files which were not updated in v0.56.

You can find the update in the WordPress Plugin Repository or on your Dashboard as an update.

Email Users v4.5.1 released

This evening I released a minor update to Email Users. This update, v4.5.1 addresses two feature requests (Post Author Keyword Replacement and Post Excerpt Filtering, removes some debug code, and adds Italian language support.

You can find the update in the WordPress Plugin Repository or on your Dashboard as an update.

WordPress Google Form v0.56 released

This evening I released v0.56 of WordPress Google Form.  I have not had any bug reports in about a week and my own usage has looked pretty solid so it was time to push it out.

GForm_SS_60This release fixes some issues dealing with UTF-8 characters which are common when using non-English versions of Google Forms.  It also adds a significant new feature in HTML5 Placeholders.  Placeholders are useful for providing your users with hints on what should entered into various fields without setting default values which could then be submitted.  A placeholder has the appearance of a value without actually having something that can be POSTed to the form processor.

Placeholders are an advanced topic in that usage requires knowing the name of the input element.  I have based Placeholders on the same basic usage model as the Advanced Validation functionality I introduced a few releases back.  Locating the name of the input element isn’t difficult but does requiere examining the HTML source.  I wrote up a post on Advanced Validation a few weeks ago and there is a good description of how to identify the name of the input element.

You can find this update on your WordPress Dashboard or in the WordPress plugin repository.

WordPress Google Forms v0.56-beta-4 available

GForm_SS_62

I have released beta-4 of WordPress Google Forms.  This beta update addresses a problem reported where the settings for the form weren’t being saved correctly (e.g. turning Title on would not appear to be saved).

It turns out that the settings were saved correctly so the form would work as desired however subsequent edits to the form would return all of the settings to the default state which would then be saved unless the author noted they were wrong and set them correctly again.

The logic to pre-populating the current state of the form’s settings was faulty.  This beta update fixes this bug.

Google Forms Beta (7987 downloads )

WordPress Google Form v0.56-beta-3 available

This evening I released beta-3 of WordPress Google Form.  This release addresses a requested feature to have “pre-populated fields which disappear when clicked“.

My solution to this request was to implement the placeholder attribute for the input tag.  This is also much easier than expecting users to decipher the complex URL requirements to pass default values to a form.  The difference between a placeholder and a default value is the placeholder value cannot be submitted.  In the case of wanting to have something like “email address”, which isn’t a valid email address, in the form field as a “placeholder”, using the placeholder attribute is a better solution.  At least I think so.

GForm_SS_60

Placeholder values are defined when the form is added as a Custom Post Type.

GForm_SS_61

Like the custom validation rules, to use placeholders you will need to know the name attribute for the field you are defining a placeholder for.  Refer to this post I wrote on Advanced Validation to learn how to identify the field name.

Google Forms Beta (7987 downloads )