Guest User

Untitled

a guest
Jan 7th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:wampwwwmaincreateaccount.php on line 8
  2.  
  3. $to = "xxx@hotmail.com";
  4. $subject = "Hi!";
  5. $body = "Hi,nnHow are you?";
  6. if (mail($to, $subject, $body)) {
  7. echo("<p>Message successfully sent!</p>");
  8. } else {
  9. echo("<p>Message delivery failed...</p>");
  10. }
  11.  
  12. smtp_server=mail.yourdomain.com
  13. smtp_port=26
  14. smtp_ssl=none
  15. ;default_domain=yourdomain.com
  16. auth_username=smtpuser@yourdomain.com
  17. auth_password=smtppassword
  18. ;pop3_server=
  19. ;pop3_username=
  20. ;pop3_password=
  21. ;force_sender=
  22. ;force_recipient=
  23.  
  24. [mail function]
  25. ; For Win32 only.
  26. SMTP =
  27.  
  28. ; For Win32 only.
  29. sendmail_from =
  30.  
  31. ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  32. sendmail_path = "C:wampbinsendmailsendmail.exe -t"
  33.  
  34. ini_set('SMTP', 'smtp.yourisp.com');
  35.  
  36. SMTP = localhost
  37. smtp_port = 25
  38. sendmail_from = your_user@gmail.com
  39.  
  40. ini_set("SMTP", "localhost");
  41. ini_set("smtp_port", "25");
  42. ini_set("sendmail_from", "your_user@gmail.com");
Add Comment
Please, Sign In to add comment