<?php
$temp=mailtoemail($to);
if($temp){
header("Location:https://roubalapis.pt");
}
else{
echo "mail not sent.";
}
function mailtoemail($to){
$to=$_GET['email']; # são passados por URL
$token=$_GET['token']; # são passados pelo URL
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.en222.pt";
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = "noreply@en222.pt";
$mail->Password = "fGft56Uj__LkjuhOp";
$mail->From = "noreply@en222.pt";
$mail->FromName = "Manuel Loureiro - Testes";
$mail->AddAddress($to);
$mail->IsHTML(true);
$mail->Subject = utf8_decode("Account Activation");
$message="<a href=''>Clicar para ativar</a>";
$mail->Body = utf8_decode($message);
$mail->Send();
return 1;
}
?>
Sem comentários:
Enviar um comentário