isSMTP(); // Set mailer to use SMTP $mail->Host = 'mail.yogeshbathe.in'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'contact@yogeshbathe.in'; // SMTP username $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption $mail->Port = 587; // TCP port to connect to // Recipients $mail->setFrom('contact@yogeshbathe.in', 'Mailer'); $mail->addAddress('contact@yogeshbathe.in', 'noreplay@pgrent'); // 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->SMTPDebug = 2; // Enable verbose debug output $mail->send(); echo 'Message has been sent'; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } ?>