if (mail($res['mail'], $subject, $mail, $adds)) {
to
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'user@example.com'; // SMTP username
$mail->Password = 'secret'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom($set['email'], 'NoReply');
$mail->addAddress($res['mail'], $res['name']);
$mail->Subject = $subject;
$mail->Body = $mail;
$mail->AltBody = $mail;
if ($mail->send()) {
Do not forget to specify the data to connect to the SMTP