SettingsController::emailPreview PHP Method

emailPreview() public method

Echoes out a test email with the colors and image in the post request.
public emailPreview ( )
    public function emailPreview()
    {
        $request = Gdn::request();
        $image = $request->post('image', '');
        $textColor = $request->post('textColor', '');
        $backGroundColor = $request->post('backgroundColor', '');
        $containerBackGroundColor = $request->post('containerBackgroundColor', '');
        $buttonTextColor = $request->post('buttonTextColor', '');
        $buttonBackgroundColor = $request->post('buttonBackgroundColor', '');
        echo $this->getTestEmail($image, $textColor, $backGroundColor, $containerBackGroundColor, $buttonTextColor, $buttonBackgroundColor)->getEmailTemplate()->toString();
    }