linux - PHP user cannot send email via Mutt but normal user can -


i experimenting php , have run problem. trying have php script send email when process has completed.

<!doctype html> <html> <body>  <?php echo shell_exec('echo "testing" | mutt -x -f /usr/web/mail.mut -s test -- my_email_here@gmail.com'); ?>  <br> thanks. pdf copys of energy plots have been emailed.  </body> </html> 

the result echo displaying "could not send message" on page.

however, when logged host, can issues exact same command , messages goes through.

some supplementary info. host linux mint vm. mta postfix. when logged host user (not php user), mutt works terminal. i've checked file permissions on mutt config file specified , should fine. mutt config file (/usr/web/mail.mut) has account info gmail. again, when execute same command messages comes through. tried looking in /var/log/syslog there not entries.

grateful advice.

edit:

as per michal's comment. i've tried following same result.

echo shell_exec('mutt -f /usr/web/mail.mut -s testing -- myemailhere@gmail.com < message'); 

did not solve problem found better solution trying do.

ended using phpmailer ssmtp (postfix have worked ssmtp super easy set up).


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -