New answers tagged wp-mail
Do you know if your wp_mail() function is working at all? Do you know whether or not your function isn't failing higher in the chain? I'd re-write the function like this, which makes it a little easier to read and also slightly more efficient as we are only running functions that we absolutely need to given a certain condition being met. Also, I've ...
You can also debugging inside your function. Write the data of vars in a transient with WordPress default functions, like set_transient() or debug in the console of your browser. You can use the plugin Debug Objects for write from php to the console of Webinspector in Chrome. Maybe it is a good idea to add a exit(); before close brackets od the function to ...
Wordpress uses by default wp_mail()source which is a PHP function very similar to the native PHP mail. Hence this service is provided by your server/host. This function is, however, pluggable, which means it can be overridden by plugins and custom functions, so it might be slightly different in your case.
Yes, you can use an array of recipients: * @param string|array $to Array or comma-separated list of email addresses to send message. * @param string $subject Email subject * @param string $message Message contents * @param string|array $headers Optional. Additional headers. * @param string|array $attachments Optional. Files to attach. * @return bool ...
There's the wp_mail() function in WordPress. The headers have to be added as array without trailing \n\r or similar. Example wp_mail( 'firstname.lastname@example.org' ,'Hello World!' ,'Just saying...' ,array( 'MIME-Version: 1.0' ,'Content-type: text/html; charset=iso-8859-1' ,sprintf( 'From: %s <no-reply@%s>' ...
The MailPress plugin does a good job of sending 1000's of emails so it might be worth examining the source code to see how it works.
Top 50 recent answers are included