I'm trying to get this to send the form information to multiple e-mails but for some reason it only sends to whichever e-mail is listed first in the $mail->address field. Can anyone help?
if(empty($errors)) {
require 'phpmailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->Host = '192.168.555.555';
$mail->SMTPAuth = false;
$mail->Username = '';
$mail->Password = '';
$mail->SMTPSecure = '';
$mail->Port = 25;
$mail->From = 'donotreply@website.com';
$mail->FromName = $from;
$mail->addAddress('email1@email.com' , 'email2@email.com');
$mail->isHTML(true);
$mail->Subject = 'Employment Application';
$mail->Body = $message;
if($mail->send()) {
//echo 'Mailer Error: ' . $mail->ErrorInfo;
$success = '<div class="alert alert-success"><h3 style="margin:0">Message Sent!</h3></div>';
}
}