public function send() {
        $input = Input::only(array('name', 'email', 'comment', 'to_email', 'to_name', 'security-code'));

        $input['security-code'] = $this->quickSanitize($input['security-code']);

        if (strlen($input['security-code']) < 2) {

            $message = "Please enter the security code again. Thank you!";

            return view('lasallecmscontact::step_two_form', [
                'input'   => $input,
                'message' => $message,
            ]);
        }

        // Guess it couldn't hurt to run inputs through the quick sanitize...
        $input['name']    = $this->quickSanitize($input['name']);
        $input['email']   = $this->quickSanitize($input['email']);
        $input['comment'] = $this->quickSanitize($input['comment']);


        // The "to_email" comes from the LaSalleCRMContact package. If it contains an email address,
        // then the contact form was filled out in that package. So, let's figure out the "to" email
        $to_email = Config::get('lasallecmscontact.to_email');
        $to_name  = Config::get('lasallecmscontact.to_name');
        if ($input['to_email'] != "") {
            $to_email = $input['to_email'];
            $to_name  = $input['to_name'];
        }

        Mail::send('lasallecmscontact::email', $input, function($message) use ($to_email, $to_name)
        {
            $message->from(Config::get('lasallecmscontact.from_email'), Config::get('lasallecmscontact.from_name'));
            $message->to($to_email, $to_name)->subject(Config::get('lasallecmscontact.subject_email'));
        });

        // Redir to confirmation page
        return Redirect::route('contact-processing.thankyou');
    }
public function send() {
        $input = Input::only(array('name', 'email', 'comment', 'to_email', 'to_name', 'security-code'));

        $input['security-code'] = $this->quickSanitize($input['security-code']);

        if (strlen($input['security-code']) < 2) {

            $message = "Please enter the security code again. Thank you!";

            return view('lasallecmscontact::step_two_form', [
                'input'   => $input,
                'message' => $message,
            ]);
        }

        // Guess it couldn't hurt to run inputs through the quick sanitize...
        $input['name']    = $this->quickSanitize($input['name']);
        $input['email']   = $this->quickSanitize($input['email']);
        $input['comment'] = $this->quickSanitize($input['comment']);


        // The "to_email" comes from the LaSalleCRMContact package. If it contains an email address,
        // then the contact form was filled out in that package. So, let's figure out the "to" email
        $to_email = Config::get('lasallecmscontact.to_email');
        $to_name  = Config::get('lasallecmscontact.to_name');
        if ($input['to_email'] != "") {
            $to_email = $input['to_email'];
            $to_name  = $input['to_name'];
        }

        Mail::send('lasallecmscontact::email', $input, function($message) use ($to_email, $to_name)
        {
            $message->from(Config::get('lasallecmscontact.from_email'), Config::get('lasallecmscontact.from_name'));
            $message->to($to_email, $to_name)->subject(Config::get('lasallecmscontact.subject_email'));
        });

        // Redir to confirmation page
        return Redirect::route('contact-processing.thankyou');
    }
public function send ( ) { $ input = Input :: only ( array ( 'name' , 'email' , 'comment' , 'to_email' , 'to_name' , 'security-code' ) ) ; $ input [ 'security-code' ] = $ this -> quickSanitize ( $ input [ 'security-code' ] ) ; if ( strlen ( $ input [ 'security-code' ] ) < 2 ) { $ message = "Please enter the security code again. Thank you!" ; return view ( 'lasallecmscontact::step_two_form' , [ 'input' => $ input , 'message' => $ message , ] ) ; } // Guess it couldn't hurt to run inputs through the quick sanitize... $ input [ 'name' ] = $ this -> quickSanitize ( $ input [ 'name' ] ) ; $ input [ 'email' ] = $ this -> quickSanitize ( $ input [ 'email' ] ) ; $ input [ 'comment' ] = $ this -> quickSanitize ( $ input [ 'comment' ] ) ; // The "to_email" comes from the LaSalleCRMContact package. If it contains an email address, // then the contact form was filled out in that package. So, let's figure out the "to" email $ to_email = Config :: get ( 'lasallecmscontact.to_email' ) ; $ to_name = Config :: get ( 'lasallecmscontact.to_name' ) ; if ( $ input [ 'to_email' ] != "" ) { $ to_email = $ input [ 'to_email' ] ; $ to_name = $ input [ 'to_name' ] ; } Mail :: send ( 'lasallecmscontact::email' , $ input , function ( $ message ) use ( $ to_email , $ to_name ) { $ message -> from ( Config :: get ( 'lasallecmscontact.from_email' ) , Config :: get ( 'lasallecmscontact.from_name' ) ) ; $ message -> to ( $ to_email , $ to_name ) -> subject ( Config :: get ( 'lasallecmscontact.subject_email' ) ) ; } ) ; // Redir to confirmation page return Redirect :: route ( 'contact-processing.thankyou' ) ; }
Process the second intermediate contact form.
Process the second intermediate contact form .