email-send-event.ts 679 B

1234567891011121314151617181920212223
  1. import { RequestContext, VendureEvent } from '@vendure/core';
  2. import { EmailDetails } from './types';
  3. /**
  4. * @description
  5. * This event is fired when an email sending attempt has been made. If the sending was successful,
  6. * the `success` property will be `true`, and if not, the `error` property will contain the error
  7. * which occurred.
  8. *
  9. * @docsCategory core plugins/EmailPlugin
  10. * @since 2.2.0
  11. */
  12. export class EmailSendEvent extends VendureEvent {
  13. constructor(
  14. public readonly ctx: RequestContext,
  15. public readonly details: EmailDetails,
  16. public readonly success: boolean,
  17. public readonly error?: Error,
  18. ) {
  19. super();
  20. }
  21. }