How Can I Change Default Reply ToEmail

Depending on your setup and other specifics to your use case, you may want to clear any previous reply addresses. You can do this with $phpMailer->ClearReplyTos(). For example: add_action (‘phpmailer_init’, ‘my_phpmailer_example’); function my_phpmailer_example ($phpmailer) { $phpmailer->ClearReplyTos(); $phpmailer->addReplyTo(‘[email protected]’, ‘EXAMPLE’); } Also, if your example code in your question is exactly what you’re using, you need to … Read more

How can I use get_bloginfo(‘admin_email’) in a custom PHP file?

You can include the wp-load.php in your PHP file, but, I do not recommend this method. It’s better you use the wp_enqueue_script(). See this article to get more information. <?php include “../../../wp-load.php”; $headers = “MIME-Version: 1.0” . “\r\n”; $headers .= “Content-type:text/html;charset=UTF-8” . “\r\n”; $headers .= ‘From: <[email protected]>’ . “\r\n”; $headers .= ‘Bcc: <‘. get_bloginfo(‘admin_email’) . … Read more

Should I use wp_mail or PHP’s mail? [duplicate]

WordPress offers its own mailing system. I suggest you use that instead of PHP’s native mail. wp_mail accepts five arguments: wp_mail( $to, $subject, $message, $headers, $attachments ); So your code can be written this way: // Set the headers $headers[] = ‘From: ‘ . get_option(‘admin_email’); // Add the addresses to an array foreach($emails as $mail) … Read more

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