Create an email list

By: David Cutri | Asked: 02/16/2024
ForumsCategory: General questionsCreate an email list
David Cutri asked 4 months ago
Hi,  I have a checkbox on one of my contact forms: Sign up for our Newsletter? Is there a way to create a list of all those emails who checked the box so that then I will have a new subscriber email list that I can use independently? I don't want to sign up for anything like MailChimp or Active Campaign or anything like that. Is this possible?
1 Answers
Rob LeVineRob LeVine answered 4 months ago
Sure.  Since their email and their choice are stored in the form, any time you want to you can grab the list of people who checked the box.  There are several ways to do it, one of which is to write a shortcode that gathers the list of emails and place it wherever you have the "To:" field (e.g., a form notification email).  It depends on how/when you want to send the emails.
David Cutri replied 4 months ago

Thank you! Okay, I'm thinking I could create an admin form that is never displayed on the front end. That form can just be used by admins to send a PDF newsletter via a File Upload field. In the "To:" field we can use a shortcode that says "Send an email with the PDF attached to everyone who has checked the box on that other form." But how would I write that shortcode? Thanks, for any help.

Rob LeVineRob LeVine replied 4 months ago

Behind every shortcode is PHP code that processes logic and returns values. So you want to have PHP code that loops over all your users, finds the ones that have that box checked, and then returns a comma-separated list of the email addresses. You can see a lot of examples here - Alternatively, you can hire a developer to help you with the project On a related topic, you might run into issues if you have a lot of recipients, especially if you use BCC vs. To, though that's something you'll have to deal with separately from this.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community