---
title: "EmailEventHandlerWithAsyncData"
generated: true
---
<GenerationInfo sourceFile="packages/email-plugin/src/handler/event-handler.ts" sourceLine="506" packageName="@vendure/email-plugin" />

Identical to the <DocsLink href="/reference/core-plugins/email-plugin/email-event-handler#emaileventhandler">EmailEventHandler</DocsLink> but with a `data` property added to the `event` based on the result
of the `.loadData()` function.

```ts title="Signature"
class EmailEventHandlerWithAsyncData<Data, T extends string = string, InputEvent extends EventWithContext = EventWithContext, Event extends EventWithAsyncData<InputEvent, Data> = EventWithAsyncData<InputEvent, Data>> extends EmailEventHandler<T, Event> {
    constructor(_loadDataFn: LoadDataFn<InputEvent, Data>, listener: EmailEventListener<T>, event: Type<InputEvent>)
}
```
* Extends: <DocsLink href="/reference/core-plugins/email-plugin/email-event-handler#emaileventhandler">`EmailEventHandler`</DocsLink><T, Event>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(_loadDataFn: <a href='/reference/core-plugins/email-plugin/email-plugin-types#loaddatafn'>LoadDataFn</a><InputEvent, Data>, listener: <a href='/reference/core-plugins/email-plugin/email-event-listener#emaileventlistener'>EmailEventListener</a><T>, event: Type<InputEvent>) => EmailEventHandlerWithAsyncData`}   />




</div>
