Guest User

Untitled

a guest
Nov 21st, 2017
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. Mail script
  2.  
  3. <?php
  4.  
  5. require("class.phpmailer.php");
  6.  
  7. $mail = new PHPMailer();
  8. Script
  9. $mail->IsSMTP();
  10. $mail->Host = "ecowin.in";
  11. $mail->SMTPAuth = true;
  12. //$mail->SMTPSecure = "ssl";
  13. $mail->Port = 587;
  14. $mail->Username = "test@ecowin.in";
  15. $mail->Password = "*********";
  16.  
  17. $mail->From = "info@ecowin.in";
  18. $mail->FromName = "Test from Info";
  19. $mail->AddAddress("mailhostingserver@yahoo.com");
  20. //$mail->AddReplyTo("mail@mail.com");
  21.  
  22. $mail->IsHTML(true);
  23.  
  24. $mail->Subject = "Test message from server";
  25. $mail->Body = "Test Mail<b>in b Script old!</b>";
  26. //$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
  27.  
  28. if(!$mail->Send())
  29. {
  30. echo "Message could not be sent. <p>";
  31. echo "Mailer Error: " . $mail->ErrorInfo;
  32. exit;
  33. }
  34.  
  35. echo "Message has been sent";
  36.  
  37. ?>
Add Comment
Please, Sign In to add comment