Account password with PHPmailer

Good day,

I have just moved my website from one host to another. My new host has disables PHP mail() function, ans he is suggesting me to use PHPmailer instead.

According to the host, I have to write an e-mail account and password in the PHP code, in order to validate the account and avpoid spam.

Is is safe? Is it possible for any person sufring my website to see the cose and catch the password?

Here the suggested code, thanks a lot!!!

<?php
require_once("class.phpmailer.php");
//include("class.smtp.php");
$mail = new PHPMailer();
$mail->IsSMTP(); //Establece que el correo para enviar el mensaje a es través de SMTP, Si se establece en true, otras opciones también están disponibles. (verdadero, falso o en blanco)
$mail->SMTPAuth = true; // True para que verifique autentificación de la cuenta o de lo contrario False
//$mail->SMTPSecure = "ssl";
$mail->Host = "mail.ppservicios.cl";///* Sustituye (ServidorDeCorreoSMTP)  por el host de tu servidor de correo SMTP*/
$mail->Port = 25;//puerto***
$mail->Username = "a@ppservicios.cl";
$mail->Password = "123456";

$mail->From = "a@ppservicios.cl";
$mail->FromName = "prueba";
$mail->Subject = "prueba";
$mail->cuerpo = "esto es una prueba";
$mail->AddAddress("correo@dominio.com","Nombre a mostrar del Destinatario");

$mail->WordWrap = 50;

$body  = "Hola, este es un…";
$mail->IsHTML(true);//Para indicar si el mensaje contiene HTML:
$mail->Body = $body;
$mail->Send();
// Notificamos al usuario del estado del mensaje

if(!$mail->Send()) {
  echo "Error: " . $mail->ErrorInfo;
} else {
  echo "Mensaje enviado correctamente";
}
?>