Topic: How to add CC or BCC to Apply Online?
In my Apply Online page I've added a 'Send copy to:' field with the ID $my_email so the applicant can CC themselves on the Application or BCC so companies don't see that applicants have CC'd themselves in the email...kind of weird IMO.
I thought it would be smoother then developing a whole new section just so applicants can track what they applied to. This way applicants can have a record themselves. I'm not sure of the syntax for adding CC or BCC. Here's what my class.Postman.php has now...(I'm assuming that's the correct file).
How can I get it to include the $my_email string when the application is send?
I thought it was as simple as adding one of the below under the FromName string...
$mail-> CC = $data['my_email'];
...or...
$mail-> BCC = $data['my_email'];
...but that didn't work.
// Send online application to employer
public function MailApplyOnline($data)
{
$extra = '\n\n---\nThis email is sent from' . $_SERVER['HTTP_REFERER'] . 'via JobGaint.';
$mail = new PHPMailer();
$mail->From = $data['apply_email'];
$mail->FromName = $data['apply_name'];
$mail->Body = str_replace(array('\r\n', '\r', '\n'), '<br />', $data['apply_msg'] . $extra);
$mail->AltBody = $data['apply_msg'] . $extra;
$mail->Subject = "[" . SITE_NAME . "]'" . $data['job_title'] . "'application";
$mail->AddAddress($data['company_email'], $data['company_name']);
}
Tokyoj
"You can't build a reputation on what you're going to do." (Henry Ford)
"Insanity is doing the same thing over and over, expecting different results." (Albert Einstein)