Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * send arguments to a python script from php and send mail to specified recipient
- */
- //first value is the '$to' value and second is '$body'
- $to = 'dokwii@smsmedia.info';
- $body = 'this is from cmd';
- $cmd = "python sendmail.py '$to' '$body'";
- if(shell_exec($cmd)){
- print "successfully fireup python mail script";
- } else {
- print "failed to fireup python mail script";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement