How to Get the list of emails from the WordPress Comments?


Suppose you have a wordpress blog and you want to send a email to say ‘thank you’ to all the people who left good comments (you approved them). You need a list of emails.

The following SQL does the job. It will return distinct emails (no duplicate).

SELECT distinct `comment_author`, `comment_author_email` FROM `wp_comments` WHERE `comment_author_email` <> '' and `comment_author` <> '' and `comment_approved` = 1;

The result looks like this:

email-list How to Get the list of emails from the Wordpress Comments? beginner code database programming languages sql wordpress

Email List for WordPress Comments using SQL

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
171 words
Last Post: Javascript Function To Jump Out Of The Frame
Next Post: Ternary Operator and Boolean

The Permanent URL is: How to Get the list of emails from the WordPress Comments?

Leave a Reply