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