bende şu şekilde çalışıyor:
            $mail->isSMTP();
            $mail->SMTPAuth     = true;
            $mail->Host         = "smtp.yandex.com";
            $mail->SMTPSecure   = "tls";
            $mail->Port         = 587;