Email Users





Are you using Email-Users? If so, please consider making a donation!

Email Users is a plugin I have used for a number of years on the MacDolphins web site.  After contributing a number of patches to the plugin, in late May of 2012 I was invited to be a plugin contributor which I accepted.  Being a plugin contributor allows me to commit changes to the Email Users plugin Subversion repository and release updates.

I have been responsible (both good and bad) for changes and enhancements in the 4.x releases.  The changes are documented in the Change Log but in summary, here are the key new features:

  • New menus which are compliant with the WordPress 3.x menu API
  • Re-architected Options model which is compliant with the new Options API.
  • New Users Settings page which allow bulk control over user settings for notifications and mass email.
  • Additional control over the default settings for all users.

You can download Email Users from the WordPress Plugin Repository or install it from the WordPress Dashboard.  I try to monitor the Support Forum and address any issues people encounter with the plugin.

102 thoughts on “Email Users

  1. Pingback: www.MichaelWalsh.org | The Magic of the get_users() Function

  2. Hi Mike,

    I wondered if it was possible to have a discussion with you regarding the email. Within the WordPress Plugin Directory I tried to go to the plugin homepage for documentation but, unfortunately the site it linked to was down.

    I wish to also ask whether you are able to modify the plugin slightly?

    Look forward to hearing from you.

    Sheldon

  3. Mike
    I am looking to do an “ask chad” section on my blog. I just want to capture emails, first and last name and their question. Would you recommend WordPress google forms? I know you made it , but from a layman’s perspective, Is it pretty easy to set up?

    Thanks
    Chad

    • Chad -

      If you use Google Docs then setting up WordPress Google Forms is pretty simple. That said, it sounds like all you’re looking for is a simple contact form. There are a number of plugins that provide that functionality. If you want to have all of the questions and emails addresses in a spreadsheet automatically, then my plugin is a good solution.

      Creating a Google Form is pretty simple, Google’s interface is very easy to use and the form you create has a complementary spreadsheet where the results are stored.

      My suggestion would be to try it and see if you like the results. You should be able to set up what you’re proposing in 30 minutes or less.

  4. Hi, is it possible to edit the default message that appears at the top of page/post notifications?

    Hello,

    I would like to bring your attention on a new post published on the blog. Details of the post follow; I hope you will find it interesting.

    Best regards,

  5. hi,
    Its a great plugin

    it is possible to change the sender name userform to other.

    Best Regards

    • You have the ability to change the “Send From” address on the plugin settings page (Dashboard->Settings->Email Users). When you set it there, you’ll have a choice when composing the message whether it comes from the email from your logged in ID or from the Sender Override email address.

      • Thanks for quick response

        There is a field “From Sender Name Override” i enter the site name but there is no changes in the email there is still userform

        • Maybe I don’t understand what you are asking. This is what I see on my site:

          Email Users Oveeride

          I am able to select between two email addresses. The first is for me (the current user), the second is the override address which is set up on the plugin settings page.

  6. I have the latest wordpress installed.I installed plugin,but when I try to activate it I keep getting a fatal error message and it says failed to activate due to fatal error,any idea of what could cause that

  7. Is there a way to add an attchment to the email message?

  8. Hi Mike

    I was able to installed Email users in my wordpress ver 3.5.2 but it does not work properly.

    When I tried sending emails, it did show emails being sent but the recipients did not actually receive the emails. Why?

    Please help me t fix the issue.

    • There are potentially many, many reasons why your users wouldn’t receive emails. First thing is to verify WordPress is able to properly send email. There is a Email Test at the bottom of the plugin settings page, does that work? If so, have you tried sending mail to a single user?

      • Hi, I’m currently having the same issue. I did a test and I received the email, and I’m also able to send to a single user and they confirmed receipt. However when sending to the whole group NO ONE is receiving them.

        • Can you test with the newest beta release and see if it is still an issue? new beta version which, to the best of my knowledge, resolves this issue. Thanks to the help of a few people in the Email Users community. I would not have been able to resolve this problem with out their help. If you want to check out the new build, please turn on Debug mode (see the article) as it will prevent email from being sent while you verify things appear operating normally. Mike”>Latest beta release is here.

          • I’m new to understanding this so I’m unsure how to test other than if the version shows up in my Update Plugins in my dashboard, which it does not. I have Apple so I don’t think I can download zip files.

          • On your Mac you can download the zip file, just like you can on a Windows machine. The file doesn’t (and shouldn’t) be unzipped. Once you’ve downloaded it, within WordPress you go to the Plugins->Add New menu and instead of searching, choose the “Upload” link that is above the search box. You would upload the zip file you download from my web site and WordPress will do the rest.

  9. Hi Mike

    Thanks for the quick response. I have tried Email test and also tried sending to my another email but still won’t work. Btw, my wordpress site is hosted in a VPS.

    • If the test message doesn’t work then it likely means that (a) your email is being flagged as SPAM or (b) wp_mail() isn’t working. If you are certain that your mail isn’t being flagged as spam, then you need to verify wp_mail() is working. Do you get email notifications from your blog for comments and/or user registrations? I had a couple sites where I was using Email Users which were running under IIS and the only way I could get mail to work was to install and configure the WP-Mail-SMTP plugin.

      Email Users assumes wp_mail() is working, if it isn’t working on your site then that is outside the scope of what Email Users does – you’ll need to figure out why wp_mail() isn’t working before trying to use Email Users.

  10. Thanks for the info. I have got it done earlier by installing Easy WP SMTP plugin and then configured my SMTP server settings. Now it is working perfectly. Thanks.

  11. Thanks for the plugin.

    In the body of the emails, can we include variables such as %user_login% and other items from the users and usermeta tables?

    I tried a few options but no joy.

    • There are a few keywords you can use but none of them are user based. The reason for this is Email Users sends the minimum number of email messages possible by putting all of the recipients in the BCC email header. Each user doesn’t actually receive a unique email message. The only exception to this is when you select a single recipient for an email. In that case the recipient will appear in the TO email header.

      Here is a list of keywords the Email Users supports:

      1. %BLOG_URL% the link to the blog
      2. %BLOG_NAME% the blog’s name
      3. %FROM_NAME% the WordPress user name of the person sending the mail
      4. %POST_TITLE% the title of the post you want to highlight
      5. %POST_EXCERPT% the excerpt of the post you want to highlight
      6. %POST_URL% the link to the post you want to highlight
  12. Hi Michael,

    I would be grateful if you could give me an example of a single filter using two different meta key/value pairs to make a custom group in Email Users (I posted to the WP plugin forum regarding this, too) – feel free to email me back directly.

    Thank you!

    • I am in the middle of some Email-Users work right now, I will see if I can put together an example in the next day or so. If you have a specific example that you are trying to use let me know and I can try and model an example after it.

      • mailusers_register_user_custom_meta_filter(‘Subscribed to Email List’, ‘wp_s2member_custom_fields’, ‘a:1:{s:10:”email_list”;s:1:”1″;}’);
        mailusers_register_user_custom_meta_filter(‘Level 1′, ‘wp_capabilities’, ‘a:2:{s:15:”s2member_level1″;b:1;s:15:”bbp_participant”;b:1;}’);

        I’m using this to create filters for s2member. Both of the above pieces of code work, and create two different filters. I want a single filter that filters by both attirbutes, which will create a filter that selects all Level 1 members with 1 (true) in their Email List field (which is an s2member custom field). Both are in the user meta table.

        Thank you.

        • The Custom Meta Filter functionality isn’t flexible enough to do what you are trying to. However, I can see how something like that would be useful. On my flight from Phoenix to Charlotte this morning I added a new filter that will allow filters to be updated dynamically. What this means is you could add a hook that will fire when you send and email or do a post/page notification. Before the recipient lists are built the action fires which means you could define a user meta value that is updated by the hook based on some other conditions.

          In my simple case I used my existing Police and and Fire department examples and extended by defining a new filter I called Public Works. When my hook fires it scans the existing users and sets the Public Works meta value for any user that is assigned to one of the departments I defined (Police. Fire. Parks and Recreation, etc.).

          In your case you could define a meta value and a filter name which are updated based on your conditions anytime the filter fires. It may not be exactly what you are looking for but it will solve the problem plus it makes it easy to integrate other plugins that use their own tables instead of meta keys and values.

          I will post a beta release that has a bunch of new features in it later today including this new action.

        • Email-Users v.4.5.0-beta-1 is out which includes the new action hook that should allow you to do what you’re trying to do.

  13. I have a situation… I was wondering if I can use this plugin to email one main user and bcc all the rest when any post happens. Any kind of help and advice will be much appreciated.

    • The plugin doesn’t do any sort of automatic post notification so if that is what you were looking to do, then no, you can’t do that. The only way to do want you want to do is to use the Post Notification process twice. The first time you would select the one user you want to receive the email directly. The second time you would select all users except the one user who already received it. Anytime more than one recipient is selected, all of the recipients go into the BCC header.

      • Thank you Mike for the suggestion. I’m very new to wordpress and started using it yesterday up until today. I have learned a lot also using ftp to change things there but do you know if there is a plugin that can do what I’m talking about?

        • I don’t know of anything which will do exactly what you want. The closest I can think of is JetPack which is a collection of useful WordPress add-ons from Automattic. One of the features it offers is automatic notification for users who subscribe. You might be able to build something on top of that – a small plugin that subscribes your users but I doubt if you’ll find anything that does exactly what you’re asking for as that is a pretty unusual use case.

          • I really appreciate your help today. I will look into JetPack, I can settle for something close to what I’m looking for.

  14. Hey! Good plugin! I was wandering if there is an option for user to be able to unsubscribe, if they don’t want to receive emails?

    • Yes there is. On the user’s profile there are two settings where the user can control their settings. There are independent settings for notifications and group emails.

      As admin there is a setting on the plugin settings page that enables or disables the user’s ability to control their own email-users settings.

  15. Work with buddypress? :)

    • To be honest, I don’t know. I have never tried it. I’ve never heard that it doesn’t work which with the number of downloads Emails Users has had I would have expected if it didn’t work but having never used BuddyPress I don’t know how different it is than WordPress.

  16. Hi Mike,

    How do you import email addresses from an account within the plugin?

    • The plugin doesn’t have the ability to import addresses, it assumes your target recipients are registered users. If you have a list of email addresses you’ll have to turn them into users before you can send them email via the plugin. I wrote a small plugin to auto-generate some dummy users for testing my Swim Team plugin a couple years ago, it isn’t too hard but isn’t currently a feature of Email Users nor is it planned.

  17. Pingback: Email Users | Best WordPress Plugins & Themes

  18. Hi Mike, I’ve just installed this plugin, but, when I try to send email to user(s) or group(s), I don’t see any users/groups in the recipients box. This is odd, as there are over 2000 users subscribed to my site (with mass email on), and the users/groups functionality works in the ‘Email Users 2′ plugin (even though that plugin is not sending emails – but that’s another matter ;-)). I’ve tried tweaking general settings for both ‘Email’ and ‘Email Users’, and I’ve tested on Chrome and Safari, but nothing changes. I’m on WP 3.5.2, for what it’s worth. Can you help?

    • Would you happen to be doing this on an iPad? If so, Apple’s implementation of SELECT boxes on IOS is pretty hokey and it doesn’t display the list of potential recipients even though they are there. If you are on another platform, we’d have to enable debugging to get more data.

  19. Is there a possibility to see the outgoing e-mail with all users in bcc?

    • Yes, if you enable debugging. To enable debugging you have to manually edit the email-users.php file and change the MAILUSERS_DEBUG constant from false to true. Enabling debugging will cause the plugin to dump a bunch of stuff the PHP error log including the mail heeaders where you can see the BCC content. For some web hosts you have to enable error logging at the server level.

      I typically use the debugging guidelines outlined on the WordPress Codex, particularly WP_DEBUG_LOG, so my error log ends up in my /wp-content folder.

    • I posted a “how-to” post on debugging Email-Users earlier today. It shows how you can see the users in the BCC header.

  20. I’m getting the warning below:
    `Warning: Missing argument 5 for mailusers_replace_post_templates(), called in …/email_users_options_form.php on line 323 and defined in …/email-users.php on line 1266`

    The `$post_author` argument is missing.

    Hoping you can fix that in a new release soon. :-)

  21. Quick question , new to wordpress. Anyhow, I would like to use this plugin for front end users. Meaning, I’m creating dating website and users/subscribers could have their own mail box and send/receive messages within the site. Is it possible with this plugin?

    Many thanks, or any suggestions.

    • Email Users does not offer any mailbox functionality. It provides a facility to send email to the users of a web site using groups, specific users, etc. The actual email is delivered to the user’s email address associated with their user account. Users could mail each other however the mail itself would be handled outside of the WordPress site once the first one was delivered.

  22. Is there an option to change sender name & email?
    Thanks for great plugin

    • Yep. You can set a Sender Email Override on the plugin settings page which will then be displayed as a choice when sending an email or post/page notification.

      • Thanks bro you are the best :)

      • I can change the Override name and email, and also select it when sending an email. (eg. override info is Notice and noreply@mydomain.com) Unfortunately each time the resulting message is “From: WordPress” and the email is “wordpress@mydomain.com”
        Any ideas?

        • I just did some testing and on my site the override functionality works as it should. Have you tried putting Email Users into debug mode and looking at the mail headers to see if they look correct?

          • The PHPMailer debug info for from and fromname is incorrect.

            PHPMailer Object
            (
            [Priority] => 3
            [CharSet] => UTF-8
            [ContentType] => text/html
            [Encoding] => 8bit
            [ErrorInfo] =>
            [From] => wordpress@wmf.freshideademo.com
            [FromName] => WordPress
            [Sender] =>
            [ReturnPath] =>
            [Subject] => test

          • Hello Mike -
            I’m having the same problem as Rob. And my debug shows the same result – the FromName stays as WordPress, even though I have entered an alternative on the Settings page.
            I’d much appreciate any suggestion you might have on how to fix this!
            Thanks and regards
            Standingtree

          • If you enable debug (on the Email Users plugin settings page) what does the “From” field show?

          • Mike -

            Thanks for the response! Here you go…

            PHPMailer Object
            (
            [Priority] => 3
            [CharSet] => UTF-8
            [ContentType] => text/html
            [Encoding] => 8bit
            [ErrorInfo] =>
            [From] => wordpress@barcombe-sages.co.uk
            [FromName] => WordPress
            [Sender] =>
            [ReturnPath] =>
            [Subject] => Test for Email Users debug
            [Body] =>
            Test

            I appreciate your taking time over this – particularly as the plugin is free. Thanks!

          • What is in the wp_mail() debug section which should appear above the PHPMailer object debug?

          • This is interesting. Do you have a plugin that redefines wp_mail()? I ask because your wp_mail() debug output doesn’t look correct. What version of Email Users are you running? From the above it appears you have Email Users configured to use plain text instead of HTML formatted email, is that correct?

          • Hello again Mike -

            Plugin version is 4.6.5

            Other plugins used are:

            Add Post widget
            BackWPup
            Better WP Security
            Custom Meta Widget
            Jetpack (parts of) and Jetpack Only for Admins
            WP Logo Login
            SuperPost
            Wordfence Security
            WP Members
            WPFront User Role Editor
            WP Super Cache

            HTML is selected in Email Users settings.

            I had been though all plugin settings to see if any relate to email, but nothing jumped out…

            Thanks for your continued help!

          • Toward the bottom of the Email Users setting screen (Dashboard->Settings->Email Users) there is a section labeled “Email-Users wp_mail() Check” where it has an “actual” and “expected” path for wp_mail(). Do they match?

          • Hello Mike –
            Sorry for delayed reply – work got in the way!
            The fields match exactly, character for character. I’ve not included the detail for security reasons…

            Thanks

            Andrew

          • I am really scratching my head now – what version of PHP are you running? Does your host have it’s own special build of PHP? I’ve seen this a couple of times.

          • Hello again Mike!

            PHP is 5.3.13, via Dreamhost. A couple of random thoughts:
            1. Dreamhost suggests using its extra security layer which involves mod_security.
            2. I use the current version of the WP Members plugin to control site access. It seems there should be an option to bulk mail users via the Users panel, but that option has never showed up in my installation – ie before Email Users was installed.

            Could either of these be implicated..?

          • I cannot speak to WP Members as I am not familiar with it. I have run into mod_security before with my Google Forms plugin and it can be a giant PITA. It wouldn’t surprise me to find that mod_security is doing something with email although you’d have to access DreamHost to know for sure.

            Based on the debug information you’ve posted, there is something happening between wp_mail() where the from address still looks correct and the PHPMailer debug where it isn’t. It is possible there is a hook for PHPMailer that I am not aware of. Regardless, once the data is handed over to wp_mail(), where it still looks correct, there is nothing else Email Users does. At that point it is under control of WordPress and your server’s infrastructure.

          • Ah, well. I’s not the end of the world if a solution can’t be found – Email Users still does its job. Thanks very much for your time and help in trying!

            Standingtree

  23. I am want to have something similar to how %POST_AUTHOR% works but instead of the author I am want the User Role

  24. Well the nickname attribute would also work just fine as well.

    A little explanation of what I am using it for:
    There would be someone that posted an article and he is unable to actually log into the website and send the emailusers so someone else would have to go into it and do it for him so the signature would look like:
    %POST_AUTHOR% | %POST_ROLE%
    so when someone else is logged in the role of the author is still there vs the logged in user.

    Another way I know it could work is if each user could have their own template. (just like EU2 works)

    • or better yet be able to use shortcodes from other plugins in the email template. Now that would be better for a general audience perspective.

    • The %POST_AUTHOR% keyword uses the information for the user which authored the post, it has nothing to do with the person who is using the Notify function. Only the “from email” would appear from the user sending the notification and even that can be overridden with a setting.

      No plans to add multiple templates, that is out of scope at this time.

      • Got it! Problem was that i was using a variable that already existed and i was missing an entire line of code in a file. Not to me rude or anything here but there is at least 2 files one would have to update, the test email and the actual email (although only one file to do the job correctly but not ethically)

  25. After spending a chunk of time on it I got it recognizing %POST_ROLE% but it is only displaying a blank space.

    The main code that tells what different variables do works by it’s self but when added into the plugin and the other 3-5 files that contain variable information, it only outputs ” ” :( more work to be done tomorrow!

    • There is only one file, email-users.php, that handles keyword substitution. Within that file there are two functions which handle keyword substitution, one for the subject and one for the body. If you are editing more than one file you’re not approaching it right.

      If you want to submit a patch I’d be happy to look at it.

      • That is what I thought as well but when I only did it in the one file it gave me errors stating that it was missing from 2 other files as well so i added it to them and the errors went away…

  26. Stupid comuter o-o

    Didn’t show that it posted and the fact that I hit cancel sums up to it being posted…sorry about that!

  27. Hi I just edited the Default email (about latest post), to something to remind old users we are still alive. If i now go to the page where you select user groups, if I put nothing in the content box on that page, will it auto send the new Default email content I just did?
    cheers

    • No. The default email is just for post and page notifications. When you use the Send to Group or Send to User feature, you need to put whatever content you want to send in the message body field.

  28. Hi, is there anyway to send the email to the user with username included and password information ?

    • No there is not. WordPress user passwords are salted, there is no way to query it from the database and send it to user and it would be a security issue regardless. There was a similar question about per user email on the Support Forum recently, check my response there.

  29. Hello Mike!

    I did the upgrade to the 4.6.7 version and when I try to send the emails, the plugin says:

    “You must enter a subject.
    You must enter some content.”

    But the content and the subject are there.
    Do you know what could be happening?

    Thanx!
    Andy

    • The only thing I can think of that might be happening is another plugin is mucking with the POST data before Email Users gets a chance to look at it. Have you installed any other plugins recently? What version of Email Users were you using prior to updating? That part of the code has been stable for a long time.

  30. Hi Mike,
    I’m creating a website using your plugin for registered users to be able to send email to eachother. If i call the function it is displayed in the “dashboard” mode which confuses the users. Is there a code available to call the function from a page?
    Thanx for your advise,
    Martin.

Leave a Reply