Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public static function sendMail($type, $args) {
  2. $arg = implode(" ", $args);
  3. exec("/usr/bin/python3 ../src/Mail/mail.py $type $arg", $output);
  4. if ($output && $output[0] == '1') { // verifier code erreur
  5. $email_text = file_get_contents('../log/' . $output[1]);
  6. $from_email = 'test@monnomdedomaine.fr';
  7. $headers = "From: Youtube Playlist Checker <$from_email>\r\n". "MIME-Version: 1.0" . "\r\n" . "Content-type: text/html; charset=UTF-8" . "\r\n";
  8. mail($args[0], $output[2], $email_text, $headers);
  9. return true;
  10. } else {
  11. return false;
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement