src/Actions/EmailAction.php
protected function getBody()
    {
        $data = $this->form->data();

        unset($data[self::EMAIL_KEY]);
        unset($data[self::RECEIVE_COPY_KEY]);
        $body = '';
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $value = implode(', ', array_filter($value, function ($i) {
                    return $i !== '';
                }));
            }

            $body .= ucfirst($key).': '.$value."\n\n";
        }

        return $body;
    }
protected function getBody()
    {
        $data = $this->form->data();

        unset($data[self::EMAIL_KEY]);
        unset($data[self::RECEIVE_COPY_KEY]);
        $body = '';
        foreach ($data as $key => $value) {
            if (is_array($value)) {
                $value = implode(', ', array_filter($value, function ($i) {
                    return $i !== '';
                }));
            }

            $body .= ucfirst($key).': '.$value."\n\n";
        }

        return $body;
    }
protected function getBody ( ) { $ data = $ this -> form -> data ( ) ; unset ( $ data [ self :: EMAIL_KEY ] ) ; unset ( $ data [ self :: RECEIVE_COPY_KEY ] ) ; $ body = '' ; foreach ( $ data as $ key => $ value ) { if ( is_array ( $ value ) ) { $ value = implode ( ', ' , array_filter ( $ value , function ( $ i ) { return $ i !== '' ; } ) ) ; } $ body .= ucfirst ( $ key ) . ': ' . $ value . "\n\n" ; } return $ body ; }
Get the email body

@return string
Get the email body