Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. require("PHPMailer_5.2.4/class.phpmailer.php");
  4. $mail = new PHPMailer();
  5. $mail->IsSMTP(); // set mailer to use SMTP
  6. $mail->SMTPDebug = 1;
  7. $mail->SMTPAuth = true;
  8. $mail->SMTPSecure= "ssl"; // Used instead of TLS when only POP mail is selected
  9. $mail->From = "practicas8@soltel.es";
  10. $mail->FromName = "Rafa";
  11. $mail->Host = "smtp.serviciodecorreo.es"; // specif smtp server
  12. $mail->Port = 465; // Used instead of 587 when only POP mail is selected
  13. $mail->Username = "xxxxx@soltel.es"; // SMTP username
  14. $mail->Password = "xxxxx"; // SMTP password
  15. $mail->AddAddress("xxxx@soltel.es", "xxxx"); //replace myname and mypassword to yours
  16. $mail->AddReplyTo("xxxx@soltel.es", "Soltel2019");
  17. $mail->WordWrap = 50; // set word wrap
  18. //$mail->AddAttachment("c:\temp\js-bak.sql"); // add attachments
  19. //$mail->AddAttachment("c:/temp/11-10-00.zip");
  20. $mail->IsHTML(true); // establecer formato HTML
  21. $mail->Subject = 'test';
  22. $mail->Body = 'test';
  23.  
  24. if($mail->Send()) {echo "Send mail successfully";}
  25. else {echo "Send mail fail";}
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement