Mail sent on user creation is not the standard mail

Hi.
Is there a reason that the mail sent to a user upon creation via import is not the standard mail for such cases? In our case we have made use of the pluggable wp_new_user_notification to change the content and structure of those mails and would prefer very much that the add-on doesn’t send anything else.

Best regards
motivmedia


Comments

3 responses to “Mail sent on user creation is not the standard mail”

  1. Franz Josef Avatar
    Franz Josef

    Okay, well, at least filters 🙂

    However, the question was why it doesn’t just use wp_new_user_notification (https://developer.wordpress.org/reference/functions/wp_new_user_notification/) instead of having its own function. I don’t see the advantage of how it’s done in the plugin.

    I need to do the import only once, so I’ll probably just change the calls in the plugin. Therefor I wouldn’t benefit from any changes, but I’d highly suggest just using wp_new_user_notification. This way the mail would be identical to the one wordpress sends, even if it had been adapted (as it’s in our case).

    1. Hi,

      Filters are one reason, it’s easier to customize what’s sent as the function you suggests doesn’t offer them.

      If you are going to do the import just once, you could of course change the call but if you already know the content why not use the filters? That way you don’t need to modify anything in the plugin.

      Cheers

  2. Hi Franz,
    The plugin uses the wp_mail WordPress function. You can use our ‘groups_import_export_new_user_registration_subject’ and ‘groups_import_export_new_user_registration_message’ filters if you need to customize the email.
    Kind Regards,
    Antonio B.

Share