<?php function sendmail($title,$to,$body) { $file = fopen("/var/www/eba/mailtext","w"); fwrite($file,$body); fclose($file); echo shell_exec("python mail.py $to '$title'"); }