Advertisement
Guest User

Untitled

a guest
Oct 12th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. mail( $to, $subject, $body, $headers, '-f' . $from );
  2. // В $headers есть заголовки: From, Reply-To, Return-Path
  3.  
  4. Server: 8.8.8.8
  5. Address: 8.8.8.8#53
  6.  
  7. Non-authoritative answer:
  8. 666.666.666.666.in-addr.arpa name = mysite.com.
  9.  
  10. Authoritative answers can be found from:
  11.  
  12. Apt-get install exim4
  13.  
  14. nano /etc/exim4/update-exim4.conf.conf
  15.  
  16. dc_eximconfig_configtype='smarthost'
  17. dc_other_hostnames='server'
  18. dc_smarthost='smtp.yandex.ru::587'
  19.  
  20. nano /etc/exim4/passwd.client
  21.  
  22. smtp.yandex.ru:username@yandex.ru:password
  23.  
  24. nano /etc/email-addresses
  25.  
  26. root: username@yandex.ru
  27. www-data: username@yandex.ru
  28.  
  29. sudo /etc/init.d/exim4 restart
  30.  
  31. @reboot root sleep 60 && echo "Server reboot" | mail -s "server reboot" mail@yandex.ru
  32.  
  33. # cat testmail.php
  34.  
  35.  
  36. <?php
  37. mail('komu@mail.ru', 'тема письма', 'тело письма', 'From: ot.kogo@mail.ru');
  38. ?>
  39.  
  40.  
  41. # php testmail.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement