Guest User

Untitled

a guest
Feb 24th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <?php
  2. print "1";
  3. require("smtp.php");
  4. require("sasl.php"); //SASL authentication
  5. $smtp=new smtp_class;
  6. $smtp->host_name="smtp.gmail.com"; // Or IP address
  7. $smtp->host_port=465;
  8. $smtp->ssl=0;
  9. $smtp->start_tls=1;
  10. $smtp->localhost="localhost";
  11. $smtp->direct_delivery=0;
  12. $smtp->timeout=10;
  13. $smtp->data_timeout=0;
  14. $smtp->debug=1;
  15. $smtp->html_debug=1;
  16. $smtp->pop3_auth_host="";
  17. $smtp->user="[email protected]"; // SMTP Username
  18. $smtp->realm="";
  19. $smtp->password="House22"; // SMTP Password
  20. $smtp->workstation="";
  21. $smtp->authentication_mechanism="";
  22. print "3";
  23. if($smtp->SendMessage(
  24. $from,
  25. array(
  26. $to
  27. ),
  28. array(
  29. "From: $from",
  30. "To: $to",
  31. "Subject: $subject",
  32. "Date: ".strftime("%a, %d %b %Y %H:%M:%S %Z")
  33. ),
  34. "$message"))
  35. {
  36. print "Message sent to $to OK.";
  37. }
  38. else
  39. print "Cound not seend the message to $to.nError: ".$smtp->error;
  40. print "4";
  41. ?>
  42.  
  43. ==============================
  44.  
  45. <?php
  46. $fn="First Name";
  47. $ln="Last Name";
  48. $name=$fn.' '.$ln;
  49. $subject = "Welcome to Website";
  50. $message = "Dear $name,
  51. Your Welcome Message.
  52. Thanks
  53. www.website.com
  54. ";
  55. include('smtpwork.php');
  56. ?>
Advertisement
Add Comment
Please, Sign In to add comment