Guest User

Untitled

a guest
Jan 20th, 2018
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. php -q /home/username/public_html/x_y_z.php.
  2.  
  3. <?php
  4.  
  5. ob_start();
  6.  
  7. /* >>> your existing php code goes there */
  8.  
  9. $output = ob_get_contents();
  10. ob_end_clean();
  11.  
  12. /* the text to be mailed is now in variable $output */
  13.  
  14. mail("reciptient@host.com", "Mail from cron job" , $output, "From: Webmaster <webmaster@example.com>rnReply-To: webmaster@example.com");
  15.  
  16. ?>
  17.  
  18. sudo vi /etc/mailname
Add Comment
Please, Sign In to add comment