New answers tagged

-1

Add SPF record to your DNS so emails from your server IP are classified as legitimate Edit. Do the above with what you said. "Would setting up a domain specific email address and changing the site owner email to ***@thedomain.com help keep these messages from going into spam folders?" This will be fine as it will be the smtp server on your Web server ...


0

I would explore the use of scheduled events in WorPdress, known as wp-cron. Here is a example for that (not tested, just written here as proof of concept): // 1.- Register custom escheduled event on plugin activiation register_activation_hook( __FILE__, 'cyb_plugin_activation' ); function cyb_plugin_activation() { if( ! wp_next_scheduled( '...


0

Step 1 - Register a Custom Query Var By adding a custom query var, you make WP aware of it so it can be used in requests. function wpse_add_query_vars( $vars ) { $vars[] = 'wpse_set_to_publish'; return $vars; } add_filter( 'query_vars', 'wpse_add_query_vars' ); Step 2 - Sniff The Request Now we hook into parse_request to look for our new custom ...


0

I noticed that require(), require_once(), include() and include_once() methods were somehow not working. The files that were called using these methods were not being called and the code stopped executing forward from this point. After a lot of Googling and R&D I didn't find any solution to making the above methods work. So I decided to look into the ...


1

You can use the user_register hook and then mail all your subscribers. Something like: add_action('user_register','notify_new_member'); function notify_new_member(){ global $wpdb; $usersarray = $wpdb->get_results("SELECT user_email FROM $wpdb->users;"); $users = implode(",", $usersarray); mail($users, "New Member", 'A new member has just ...


4

You can change the email address with the wp_mail_from filter: add_filter( 'wp_mail_from', function() { return 'web@example.com'; } );


0

First the way to do this is with a form using the post method, it is slightly easier to understand: <!-- form with AJAX action and iframe target --> <form method="post" action="<?php echo admin_url('admin-ajax.php'); ?>" target="emailsendframe"> <!-- AJAX action field to trigger function--> <input type="hidden" name="action" value=...


0

In my case it was that my web hosting company was blocking my emails. Let me explain. When I created my WordPress install I used my personal email to create the main user account. That email is a GMail email address like, "me@gmail.com". That's all well and good except if the email is not hosted on your domain. When a new user signs up, WordPress uses ...



Top 50 recent answers are included