Guest User

Untitled

a guest
Mar 20th, 2018
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <br/>
  2. $mail = new PHPMailer;<br/>
  3. $mail->ClearAddresses();<br/>
  4. $mail->IsSMTP();<br/>
  5. $mail->SMTPDebug = 1;<br/>
  6. $mail->IsHTML(true);<br/>
  7. $mail->Port = 25;<br/>
  8. $mail->Host = 'mail.dominio.com';<br/>
  9. $mail->SMTPAuth = true;<br/>
  10. $mail->Username = 'webmaster@dominio.com';<br/>
  11. $mail->Password = 'mipassword';<br/>
  12. $mail->SetFrom('webmaster@dominio.com', 'Prueba');<br/>
  13. $mail->Subject = 'Correo de Prueba';<br/>
  14. $mail->SMTPSecure = 'tls';<br/>
  15. $mail->AltBody = '';<br/>
  16. $mail->CharSet = 'UTF-8';<br/>
  17. $mail->MsgHTML('Mensaje de Prueba');<br/>
  18. $mail->AddAddress('micorreo@gmail.com');<br/>
  19. if (!$mail->Send()) {<br/>
  20. echo "Error: ".$mail->ErrorInfo;<br/>
  21. } else {<br/>
  22. echo "Mensaje enviado correctamente";<br/>
  23. }<br/>
  24.  
  25. <br/> SMTP -> ERROR: AUTH not accepted from server: 504 5.7.4 Unrecognized authentication type<br/>
  26. SMTP -> ERROR: RCPT not accepted from server: 550 5.7.1 Unable to relay<br/>
  27. SMTP Error: The following recipients failed: david91chm@gmail.com Error: SMTP Error: The following recipients failed: micorreo@gmail.com<br/>
Add Comment
Please, Sign In to add comment