SMTPDebug = 2; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.madamedavila.com.br'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'rafa@madamedavila.com.br'; // SMTP username $mail->Password = 'Raf@$2017##'; // SMTP password $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; // TCP port to connect to //Recipients $mail->setFrom('marco@mm2creative.com', 'Mailer'); $mail->addAddress('rafa@madamedavila.com.br', 'Joe User'); // Add a recipient //Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'Here is the subject'; $mail->Body = 'This is the HTML message body in bold!'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); echo 'Message has been sent'; } catch (Exception $e) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } ?>