Can’t change headers / From for wp_mail()
Try changing your headers from \n to \r\n Note from here that: Each line should be separated with a CRLF (\r\n). Lines should not be larger than 70 characters.
Try changing your headers from \n to \r\n Note from here that: Each line should be separated with a CRLF (\r\n). Lines should not be larger than 70 characters.
I’m not sure how WooCommerce adds these fields, but I suspect it uses add_user_meta after the user_register form or something. Try and catch it this way instead: if ( isset( $_POST[‘first_name’] ) ) { $first_name = $_POST[‘first_name’]; }
Sending bulk mail to a certain number of users
If it’s undefined, that means you’re trying to run wp_mail() before it is loaded. Whatever you’ve hooked it to is too early. Hook your process to a later action. Essentially, anything like plugins_loaded or later.
Faster Emails with WP Mail
How to send a particular csv file as an email?
Function wp_mail() not suitable for use in a loop. Unfortunately, a loop iterating over and over hundreds of times could considerably slow down the script, as pointed out in the reference on the PHP_mail() function. It is worth nothing that the mail() function is not suitable for larger volumes of email in a loop. This … Read more
Welcome to WPD stack exchange. as I am see its look like sometimes we have forgot to add some basic need and function not working properly. Please try with header parameter: $headers[] = ‘Content-type: text/plain; charset=utf-8’; $headers[] = ‘From:’ . “[email protected]”; Also, you can use Easy WP SMTP and enable debugging and/or set that up … Read more
Updated : how to make email optional while user registration using default wordpress form
WordPress wp_mail function crashing website