Frage

I have a phone system that calls a PHP script to send an email after a call. Right now my server is set up to send it with sendmail but I'm switching over to use Mutt to send the emails. the line in my php that sends the email right now is this:

exec(mail($to, $subject, $message, $headers));

Is there something equivalent that I can send the email out through mutt from within the script?

Thanks!

War es hilfreich?

Lösung

you can exec command line via shell in you PHP script

shell_exec('mutt -s "Subject" to@mail.com < message.txt');

http://php.net/manual/en/function.shell-exec.php

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top