Advertisement
Guest User

Untitled

a guest
Jul 8th, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. '[Modify] the php.ini file to use it (commented out the other lines):
  2.  
  3. '[mail function]
  4. '; For Win32 only.
  5. '; SMTP = smtp.gmail.com
  6. '; smtp_port = 25
  7.  
  8. '; For Win32 only.
  9. '; sendmail_from = <e-mail username>@gmail.com
  10.  
  11. '; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
  12. 'sendmail_path = "C:xamppsendmailsendmail.exe -t"
  13.  
  14. [sendmail]
  15.  
  16. smtp_server=smtp.gmail.com
  17. smtp_port=25
  18. error_logfile=error.log
  19. debug_logfile=debug.log
  20. auth_username=<username>
  21. auth_password=<password>
  22. force_sender=<e-mail username>@gmail.com'
  23.  
  24. 'Warning: mail(): SMTP server response: 421-4.7.0 [14.200.59.18 15] Our system has detected that this message is 421-4.7.0 suspicious due to the very low reputation of the sending IP address. 421-4.7.0 To protect our users from spam, mail sent from your IP address has 421-4.7.0 been temporarily rate limited. Please visit 421 4.7.0 https://support.google.com/mail/answer/188131 for more information. c185si2211020itg.117 - gsmtp in C:Program Files (x86)EasyPHP-Devserver-16.1eds-wwwintroducingphpCode Work phptestmail.php on line 10
  25. Check your email now....'
  26.  
  27. <?php
  28. ini_set("SMTP", "aspmx.l.google.com");
  29. ini_set("sendmail_from", "my_email@gmail.com");
  30.  
  31. $message = "The mail message was sent with the following mail setting:rnSMTP = aspmx.l.google.comrnsmtp_port = 25rnsendmail_from = my_email@gmail.com";
  32.  
  33. $headers = "From:my_email@gmail.com";
  34.  
  35.  
  36. mail("to_email@yahoo.com", "Testing", $message, $headers);
  37. echo "Check your email now....<BR/>";
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement