Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = new PHPMailer;
- //$mail->SMTPDebug = 3;
- $mail->isSMTP();
- $mail->Host = 'smtp.gmail.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'evertonradical@gmail.com';
- $mail->Password = 'MINHASENHA';
- $mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->setFrom('jose.everton.f@hotmail.com', '5tars');
- $mail->addAddress($email);
- $mail->isHTML(true);
- $mail->CharSet = 'iso-8859-1';
- $mail->Subject = 'Recuperação de senha';
- $mail->Body = 'Este é o corpo da mensagem de teste, em '.$pwrurl.' <b>HTML</b>! :)';
- $mail->AltBody = 'Este é o corpo da mensagem de teste, em Texto Plano! rn :)';
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo 'Message has been sent';
- }
- Invalid address: Message could not be sent.Mailer Error: You must provide at least one recipient email address.
Add Comment
Please, Sign In to add comment