On form submission how to send 2 email to different users

OK, so all you need to do is to add code for second email in the same place: if ( isset( $_POST[‘submit’]) ) { $ch_name = $_POST[‘ch_f_name’]; $ch_phone_num = $_POST[‘ch_phone_num’]; $ch_email = $_POST[‘ch_email’]; $ch_company = $_POST[‘ch_company’]; $ch_job_title = $_POST[‘ch_job_title’]; $to = $ch_email; $subject = “Thank you for job Submission “; $content = “‘.$ch_name.'”; $headers=”MIME-Version: 1.0″ … Read more

An old plugin self-made stoped sending mail

Many E-Mail-Hosters changed their rules to prevent spam. Often times, E-Mails that have one domain name in their “from”-Tag and come from a server with a different domain are rejected. So my guess is, maybe the emails are still sent, but not received. You can check this by changing this line: $headers=”From: “.$senderEmail.’ <‘.$senderName.’>’ . … Read more

Wp_mail Returning False on Server

Your code looks okay to me. Instead check whether email working in other part of the website or not!! Use Postman SMTP Mailer/Email Log plugin to configure / test / debug your mail system.

wp_mail not running inside Cron

This one is a bit of a puzzler. I was originally going to say you need to determine if there’s something wrong after the mail is sent since you’re getting the hit in the next operation. But then I re-read it and caught the part about the email being received when it’s run manually. What … Read more

wp_mail recipient array not sending?

There are multiple ways of doing this. You can consider any of the following. 1.My preferred: foreach($group_emails as $email_address) { wp_mail($email_address, ‘my subject’, ‘my message’, $headers); } 2.Another way Define the array as follows. $group_emails = array(‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’, ‘[email protected]’ ); And then try your regular procedure: wp_mail($group_emails, ‘my … Read more

Add multiple recipients via BCC on wp_mail()

You’d write them the same way you would any other email, the knowledge you need to do this is Email header knowledge, not WP knowledge. Those are raw email headers, and aren’t a special WP format. Since each item in the array is a line in the header of the email, we need to know … Read more

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