I'm sure this isn't possible but I thought I would ask.
In my functions.php file I have a wp_mail function that sends an email to moderators when posts are made.
This email is sent to number of different address - these addresses might change.
I thought it would easier to set these email addresses in the WP Dashboard something like on custom page and then have functions.php update with the new emails.
Is this possible?
Yes, this is possible.
With out getting into the specific coding details you would need to store the different email addresses in the database.
You could tie in advanced custom fields to the wp_mail function to pull the different address from a list. That way you could skip building a page in the dashboard to display the addresses.
Regardless some custom coding would need to happen in the mail function to grab the data from advanced custom fields.
Related
I've questions about create a contact form and sending one mail to multiple recipients.
I am a volunteer in an association and we need to regularly share a mailing list between more than 20 coordinators.
The main problem is that we need to update this list in a regular basis.
Another problem is that you can't send a single mail to more than 100 recipients using mozilla thunderbird (so we reach the mail recipients limit).
I search for a solution to easily have access to this list for each of coordinators.
We have a website so I thought I used it in a clever way to share the said mailing list between coordinators and also be able to update it (add or delete contacts).
I tried those steps:
I created a wordpress page protected by a password, with a simple contact form (using CF7 plugin) using a textarea and a button.
install contact form 7 plugin
create a basic contact form
setting the mailing list (more than 100 mails addresses in Bcc field)
The point here is that the coordinator will write mail and it'll send the mail to the entire mailing list set in the additional headers of Contact Form 7 plugin settings.
I need to test if the mail has been received by everyone.
Another requirement is that i want to be able to send pictures and i need to have a correct text editor.
is there a way to test to send one mail to more than 100 emails adresses without being limited ?
how can i create a large amount of emails addresses for testing ? is there a tool for this ?
In the end, is this the right way to go? Or is there a simpler way to share and update the email list?
I hope I was clear enough.
Thanks in advance.
Ars_n
Wordpress: Version 4.9.11
Contact Form 7: Version 5.1.4
In my experience mailchimp has been super easy to use and very powerful. It seems like it would be able to solve all your problems you mentioned.
Here is the website: https://mailchimp.com/
Here is a plugin for your wordpress site: https://wordpress.org/plugins/mailchimp-for-wp/
I have posts on my website (custom post type) of which the content is filled from advanced custom fields input. The post also include a date field and an email address field. What I like to do is send automatic notifications to the email address when the date is today. Or even better 3 days before the date of today.
I've read some articles about using Wordpress php mail function but don't know where to start. Any points in the right direction are appreciated.
So you can use the Wordpress wp_mail() function.
https://developer.wordpress.org/reference/functions/wp_mail/
Make sure you are using a SMPT plugin so your email doesn't end up in spam.
https://wordpress.org/plugins/wp-mail-smtp/
That should get you started, not sure how I would set up the job to send the mail, by I would definitely use wp_mail().
I have an issue regarding emails sent by Woocommerce.
I have multiple custom fields, set up using the ACF plugin, for Wooocomerce orders. These fields contain additional info that should be visible in the emails sent to the user.
But for some reason I can't get them to save before the email is send and thus the email is empty of those values. Only after I click resend email are the values visible.
I tried prioritizing the action hooks using the Prioritize Hooks plugin but to no avail. Tried multiple things in order to prioritize.
I have the Woocommerce emails set up in the template that I use and get retrieve the custom fields like this:
$fields = get_field('fields', $customer_order->ID);
How can I get this to work properly? Any help is appreciated.
you need to store your data before send the email, so you need to find the correct hook.
If i'm not wrong the before_woocommerce_pay hook is your answer check here for more woocommerce hooks
I am using woocommerce in my e commerce website. I want my customers to be able to save multiple shipping and billing addresses. The addresses can be viewed and edited from my account page. In the checkout page they should be able to select one of the addresses they have already saved.
I have googled a lot and found absolutely nothing but a plugin which does not serve the purpose. I went through the woocommerce documentation but not able to figure out. I am actually overwhelmed by it and feeling lost.
Please help me guys and at least point me somewhere. This is a very common feature in a lots of website nowadays and i am sure it can be done.
In default, as you know WooCommerce only allow one billing & shipping address. But using custom code or plugins, you can achieve this feature in WooCommerce.
Writing code snippet is little difficult as per your question. But if I need the tweaks you mentioned, my approach will be given below.
Edit Checkout form with option to insert new address / select a address from saved list.
Create option in My Account page to insert new address.
Save the new user data in user meta.
If you are looking for a plugin, I would like to suggest WooCommerce Multiple Addresses Pro plugin which allows your customers to save multiple shipping and billing addresses to their My Account page.
Also the newly added addresses will be available in My Account page of the online store, from where the shopper can add, edit or remove addresses.
Moreover, the shopper can set the addresses as default, billing and shipping separately.I think this plugin will be best solution for your demands.
You might try to use this plugin: Woocommerce Multiple Addresses
If you have the Shipping Multiple Addresses plugin, add [woocommerce_select_multiple_addresses] to the checkout page.
It is working perfect.First i'm going to buy http://www.woothemes.com/products/shipping-multiple-addresses/ this plugging but this plugging save my money.
I'm new to wordpress. I have to create a one page template for my site and show a subscribe textbox on it with my own custom style. Later, I will use it to send monthly newsletters. What can be the simplest way to do that? I saw into some plugins like newsletter, subscribe2, but they are complicated and I don't know how to integrate them with my text box. They just provide some sort of widget to show on sidebar. Any tutorial or simple plugin? Please help!
You basically have three options:
a. Use a web-hosted syndication service as per the below. (Easiest to configure)
b. Install some sort of newsletter sending plugin for WordPress. (More control, but more configuration)
c. Use a web-hosted newsletter service like Constant Contact (Expensive and Ugh.).
Try using Feedburner with email subscriptions -- see: http://howtotechtips.blogspot.com/2008/05/create-feedburner-email-subscription.html. You sign up, supply your RSS feed's address, then copy-paste the resulting code where-ever in your template you like. Then, whenever you write a new post, your subscribers are sent an email.
Subscribe2 complicated?
You can do auto-download/install from the administration area, you literally only have to config a few options.
http://codex.wordpress.org/Managing_Plugins#Installing_Plugins
Maybe it's just me, but the screenshots certainly make the plugin appear to be very straight-forward.
http://wordpress.org/extend/plugins/subscribe2/screenshots/
If you are not heavy with subscription list. Then a good option can be using the MailChimp email subscription with its free option.
You can just install the plugin and place a function called mailchimpSF_signup_form() into your template's right place. And beautify it with your own CSS.
Or in Post or pages' HTML using the shortcode [mailchimpsf_form]
They also have widget to be added dynamically. How to use it?
Create a free account at MailChimp.
Create a list there.
Create an API key there
Go to your MailChimp options page http://yourwordpress.tld/wp-admin/options-general.php?page=mailchimpSF_options
Insert the API key there.
Select the list you want this subscription to be linked to.
There you are!