//バッチ処理アラートメール private static function send_mail($message) { $email_addresses = array( "w_ga@group.co.jp", ); $toStr = implode(",", $email_addresses); $subject = "同期ファイル作成失敗"; $subject = "=?UTF-8?B?".base64_encode($subject)."?="; $headers = "MIME-Version: 1.0 "; $headers .= "Content-type: text/plain; charset=utf-8 "; $headers .= "Content-Transfer-Encoding: 8bit "; //$headers .= "From: borg <w_ga@group.co.jp> "; Log::debug("メールは送信START"); $result = mail($toStr, $subject, $message, $headers); Log::debug("メールは送信END"); //送信失敗の場合、ログを出す if (!$result) { Log::error("メールは送信失敗。"); } else { Log::debug("メールは送信成功。"); } }