I am trying to make a php script that uses the exec() function to run a command that sends an email.
I am looking at something like this:
<?php
$sendTo = 'RECEPIENT';
$subject = "SUBJECT";
$message = "MESSAGE";
exec('/bin/mail -s "$sendTo" "$sendTo" < $message');
?>
I am not sure however if the variables I have declared in php can be used in the exec() function. The command however also does not seem to be correct.