Send PHP Email via CRON JOB in CENTOS 6.5 -


"postprint" itemprop = "text">

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 :

  $ 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   

script smtp_catcher.php Stay on, this is the line

  Open the #FLL file (using Apple Mail) exec ('Open' .scapeshellarg ($ filename));   

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:

  sudo visudo% www all = (ALL) NOPASSWD: /Users/<your_username>/Sites/smtp_out/smtp_catcher.php    

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -