diff --git a/app/Http/Controllers/MailController.php b/app/Http/Controllers/MailController.php index b51500d..8e5964c 100644 --- a/app/Http/Controllers/MailController.php +++ b/app/Http/Controllers/MailController.php @@ -30,6 +30,7 @@ public function index(Request $request) public function get(Request $request) { $email = $request->input('email'); + $email = strtolower($email); $key = $request->input('key', ''); $validator = Validator::make($request->all(), [ @@ -104,8 +105,8 @@ function ($attribute, $value, $fail) { 'code' => 1, 'msg' => '', 'data' => [ - 'list' => $new_email_list, - 'new_key' => Crypt::encryptString(json_encode($key)), + 'list' => $new_email_list, + 'new_key' => Crypt::encryptString(json_encode($key)), ], ]); } @@ -128,7 +129,7 @@ public function put(Request $request) $mail->from = $from; $mail->from_hash = hash('sha256', $from); - $mail->to = $to; + $mail->to = strtolower($to); $mail->to_hash = hash('sha256', $to); $mail->title = $title;