SHARE
TWEET

Untitled

a guest Jul 16th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top