Send email to all registered users [closed]

Before you begin, you should know that sending mass emails is a delicate subject matter, and your hosting provider or mail provider has certain guidelines about this. Some hosting providers, such as Dreamhost, provide “Announcement Lists”, which act as a platform for writing newsletters (or essentially emailing a large group of subscribers). Sending unsolicited email does not fall into this category, and you should approach with caution.

Probably the most barebone method of retrieving your users’ email addresses would be to extract them from your WordPress database.

Running the following MySQL query will retrieve the user’s login name in the first column, their chosen display name in the second, and their email address in the third. Using a spreadsheet, you could easily re-format all this information to your needs, such as creating a semi-colon separated string of emailaddress to use in the Bcc: header of your email.

SELECT user_login, display_name, user_email FROM wp_users provided that your tables prefix is wp_ (consult your database or wp-config.php file if you are unsure).

The reason you would use the Bcc: field of your email is so that your users will not become aware of each other’s email addresses. This is frowned upon as it is likely to cause more spam for them.