# Variable viewToEmailHtml

viewToEmailHtml: (
view: View,
state: any,
options?: { locale?: string },
) => Promise<string>

#### Type Declaration

- - (view: View, state: any, options?: { locale?: string }): Promise<string>

  - run the view and create email formatted html

    #### Parameters

    - view: View

      view to run

    - state: any

      state params for the view

    - options: { locale?: string } = {}

    #### Returns Promise<string>

    email formatted html

- Defined in packages/saltcorn-data/models/index.ts:77