hola amigos estoy tratando de agregar una clase tipo php mailer y no logro hacerla funcionar:
Código PHP:
Ver original<?php
class MailManager{
private $email;
function __construct(){
$this -> email = new PHPMailer();
}
function regmail($username,$email,$nombre,$telf,$country,$date){
$mail = $this -> email -> IsSMTP();
$subject = _SUBJECT;
$mail = $this -> From = 'email';
$mail = $this -> Username = 'email';
$mail = $this -> FromName = 'nombre';
$mail = $this -> Password = 'password';
$mail = $this -> Host = _HOST;
$mail = $this -> SMTPAuth = _SMTPAUTH;
$mail = $this -> SMTPSecure = _SMTPSECURE;
$mail = $this -> SMTPDebug = _SMTPDEBUG;
$mail = $this -> Port = _PORT;
$mail = $this -> Subject = "
$subject Cuenta Creada para: $nombre";
$mail = $this -> AltBody = "
Para ver Este mensaje Active la opcion HTML!";
$body = "<br><br>
Hola, se a creado una cuenta en WebPOS Panama para su acceso.<br>
<br>
Informacion:
Username: $username<br>
Nombre de usuario: $nombre<br>
E-Mail: $email<br>
Telefono: $telf<br>
Fecha de Registro: $date<br><br>
Contraseña: 123456<br><br>
<h2>Recuerde Cambiar la contraseña.</h2>
";
$mail = $this -> email -> MsgHTML($body);
if(!$mail-> $this -> email -> Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
echo "Message sent!";
}
}
}
?>
me sale error undefined mail... y otros mas