Guest User

Untitled

a guest
Apr 12th, 2018
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. [sendmail]
  2.  
  3. smtp_server=smtp.gmail.com
  4. smtp_port=587
  5. error_logfile=error.log
  6. debug_logfile=debug.log
  7. auth_username=testowemailer93@gmail.com
  8. auth_password=1234
  9. force_sender=testowemailer93@gmail.com
  10. php.ini
  11. [mail function]
  12. SMTP=smtp.gmail.com
  13. smtp_port=587
  14. sendmail_from = testowemailer93@gmail.com
  15. sendmail_path = ""D:xamppsendmailsendmail.exe" -t"
  16. For Win32 only.
  17. http://php.net/sendmail-from
  18. sendmail_from = testowemailer93@gmail.com
  19.  
  20. <?php
  21. $mail = new PHPMailer;
  22. $mail->isSMTP(); // Set mailer to use SMTP
  23. $mail->SMTPDebug = 2;
  24. $mail->Debugoutput = 'html';
  25. $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
  26. $mail->Port = 587;
  27. $mail->SMTPAuth = true; // Enable SMTP authentication
  28. $mail->Username = 'testowemailer93@gmail.com'; // SMTP username
  29. $mail->Password = '1234'; // SMTP password
  30. $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
  31. $mail->setLanguage('pl', './vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php');
  32. $mail->setFrom("testowemailer93@gmail.com");
  33. $mail->addAddress('xx.yyy@gmail.com'); // Add a recipient // Name is optional
  34. $mail->IsHTML(true);
  35. $mail->Subject = "Prośba o dostęp demo";
  36. $mail->Body = "<p>Wysłano z formularza kontaktowego na stronie bhp.xyz.pl.</p>
  37. </p>";
  38. if(!$mail->Send()){
  39. echo "n"."Mailer Error: " . $mail->ErrorInfo;
  40. }
  41. else{
  42. echo "Message sent!";
  43. }
  44. ?>
  45.  
  46. $mail->Hostname = 'localhost.localdomain';
  47.  
  48. <VirtualHost *:80>
  49. ServerAdmin webmaster@localhost
  50.  
  51. DocumentRoot "D:/xampp/htdocs/BHP"
  52. ServerName bhpsmart.com
  53. SSLEngine on
  54. SSLCertificateFile "conf/ssl.crt/server.crt"
  55. SSLCertificateKeyFile "conf/ssl.key/server.key"
  56. <Directory "D:/xampp/htdocs/BHP">
  57. Options All
  58. AllowOverride All
  59. Order allow,deny
  60. Allow from all
  61. Require all granted
  62. </Directory>
  63.  
  64. ErrorLog logs/platforma-error.log
  65. LogLevel info
  66. CustomLog logs/platforma.log combined
  67. </VirtualHost>
  68.  
  69. SSLEngine on
  70. SSLCertificateFile "conf/ssl.crt/server.crt"
  71. SSLCertificateKeyFile "conf/ssl.key/server.key"
Add Comment
Please, Sign In to add comment