Send PHP Email via CRON JOB in CENTOS 6.5 -
I am relatively new to CentOS, I use a lot PHP (mail) but using cron jobs Have tried to send an email in no results. Can I test it with the LAMP environment in the local? !! I succeeded in establishing a cron job, but still I'm not sure where I was wrong. After the At the local level you can do the following to test your email output: < P> If assumed 'user' User / & lt; Your username & gt; / Sites : script Feel free to do whatever you want with the file. If you are on Mac then you may also need to allow the server to open the mail client. With:
$ mkdir smtp_out & amp; Amp; CD CD smtp_out $ wget https://gist.github.com/Mulkave/5840448/raw/28d1bc680de0ff8f4be2ed8d57784691f3e74342/smtp-catcher.php -O smtp_catcher.php $ sudo chmod + x smtp_catcher.php < P> In your
php.ini configuration:
sendmail_path = sudo -u & lt; your_username & gt; Try to open the Apple Mail Client email with /users/<your_username>/Sites/smtp_out/smtp_catcher.php
smtp_catcher.php Stay on, this is the line
Open the #FLL file (using Apple Mail) exec ('Open' .scapeshellarg ($ filename));
sudo visudo% www all = (ALL) NOPASSWD: /Users/<your_username>/Sites/smtp_out/smtp_catcher.php
Comments
Post a Comment