Stop the execution of foreach loop which extract data from array?

It has probably more systematical solution, but one option is to save the highest recipient ID, and then load only higher IDs next time. Something like this: (not tested) $last_id = get_option(‘last_recipient_id’); $rcvr_id = $wpdb->get_results( $wpdb->prepare(“SELECT ID FROM wp_users WHERE ID > %d ORDER BY ID “), $last_id ) ; foreach($rcvr_id as $rv_id) { $rcvr_id … Read more

2 Email addresses for each user

You can create usermeta at time of insert user like, i create zip code in my site see this code, $user_id = wp_insert_user( array( ‘user_login’ => $user_email, ‘user_pass’ => wp_generate_password ( 12, false ), ‘first_name’ => ‘khushu’, ‘last_name’ => ‘soni’, ‘user_email’ => $user_email, ‘display_name’ => ‘khushu’ . ‘ ‘ . ‘soni’, ‘nickname’ => ‘khushu’ . … Read more

Not able to send links in email after setting header

Nothing is wrong with the code. I just added message body in stripslashes() add_action(‘wp_ajax_mail_link_popup’,’mail_link_popup’); function mail_link_popup() { $headers=”Content-type: text/html;charset=utf-8″; wp_mail($_REQUEST[‘to_email’],$_REQUEST[‘subject’],stripslashes($_REQUEST[‘message_test’]),$headers); } And it’s working now

WordPress unable to send mail

I never did get this to work, as a work around I had to configure the WP-SMTPMail to send directly to our Office365 instance, which required an additional user to be configured.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)