?correo="; exit(); } $xtpl = new XTemplate('../tpl/nombramiento.tpl.html'); $xtpl->parse("main"); $correo = $_GET["correo"]; $msgInfo = $xtpl->text("main"); //$msgInfo = "

Esto es una prueba

El correo se envió atutomáticamente, no debes hacer nada más.

"; $mail = new PHPMailer(true); $mail->IsSMTP(); $mail->SMTPAuth = true; $mail->Host = "smtp.office365.com"; $mail->Port = 587; // or 587 $mail->SMTPSecure = 'tls'; // if Port is 587 $mail->Username = "alejandro.lara@lasallistas.org.mx"; $mail->Password = ""; // Typical mail data $mail->AddAddress($correo); $mail->SetFrom("alejandro.lara@lasallistas.org.mx", "Yo"); $mail->Subject = "Add Your Subject"; $mail->Body = "This is the HTML message body For Setting up PHPMailer with Office365 SMTP using php"; $mail->AltBody = "This is the with out HTML message For Setting up PHPMailer with Office365 using SMTP"; try { $mail->Send(); echo "Setting up PHPMailer with Office365 SMTP using php Success!"; } catch(Exception $exception) { echo "
";
    var_dump($exception);
    echo "
"; //Something went bad echo "PHPMailer with Office365 Fail :: " . $mail->ErrorInfo; } ?>