public function mapInboundPostVarsToEmail_messagesFields() {

        $data = [];

        $data['user_id']            = $this->getUserIdByMappedEmailAddress();

        $data['from_email_address'] = trim($this->request->input('sender'));
        $data['from_name']          = $this->genericWashText($this->request ->input('from'));
        $data['to_email_address']   = $this->setToEmailAddressField();
        $data['to_name']            = $this->setToField();
        $data['subject']            = $this->genericWashText($this->request->input('subject'));
        $data['body']               = $this->setBodyField();
        $data['message_header']     = json_decode($this->request->input('message-headers'));
        $data['recipient']          = $this->request->input('recipient');

        return $data;
    }
public function mapInboundPostVarsToEmail_messagesFields() {

        $data = [];

        $data['user_id']            = $this->getUserIdByMappedEmailAddress();

        $data['from_email_address'] = trim($this->request->input('sender'));
        $data['from_name']          = $this->genericWashText($this->request ->input('from'));
        $data['to_email_address']   = $this->setToEmailAddressField();
        $data['to_name']            = $this->setToField();
        $data['subject']            = $this->genericWashText($this->request->input('subject'));
        $data['body']               = $this->setBodyField();
        $data['message_header']     = json_decode($this->request->input('message-headers'));
        $data['recipient']          = $this->request->input('recipient');

        return $data;
    }
public function mapInboundPostVarsToEmail_messagesFields ( ) { $ data = [ ] ; $ data [ 'user_id' ] = $ this -> getUserIdByMappedEmailAddress ( ) ; $ data [ 'from_email_address' ] = trim ( $ this -> request -> input ( 'sender' ) ) ; $ data [ 'from_name' ] = $ this -> genericWashText ( $ this -> request -> input ( 'from' ) ) ; $ data [ 'to_email_address' ] = $ this -> setToEmailAddressField ( ) ; $ data [ 'to_name' ] = $ this -> setToField ( ) ; $ data [ 'subject' ] = $ this -> genericWashText ( $ this -> request -> input ( 'subject' ) ) ; $ data [ 'body' ] = $ this -> setBodyField ( ) ; $ data [ 'message_header' ] = json_decode ( $ this -> request -> input ( 'message-headers' ) ) ; $ data [ 'recipient' ] = $ this -> request -> input ( 'recipient' ) ; return $ data ; }
Map the non-attachment vars from the inbound email webhook to the email_messages fields

@return array
Map the non - attachment vars from the inbound email webhook to the email_messages fields