async handle({ data }) {
    // Retrieve the appointment data
    const { appointment } = data;

    // Send an email to the provider, informing him, that this appointment is available again
    await Mail.sendMail({
      to: `${appointment.provider.name} <${appointment.provider.email}>`,
      subject: 'Appointment cancelled',
      // html: ''
      template: 'cancelation',
      context: {
        provider: appointment.provider.name,
        user: appointment.user.name,
        date: format(
          parseISO(appointment.date),
          "'day' dd 'of' MMMM', at' H:mm'h'",
          {
            locale: en,
          }
        ),
      },
    });
  }
// Method responsable to process and sent one email
Method responsable to process and sent one email
Method responsable to process and sent one email
async handle({ data }) {
    const { appointment } = data;
    await Mail.sendMail({
      to: `${appointment.provider.name} <${appointment.provider.email}>`,
      subject: 'Appointment cancelled',
      template: 'cancelation',
      context: {
        provider: appointment.provider.name,
        user: appointment.user.name,
        date: format(
          parseISO(appointment.date),
          "'day' dd 'of' MMMM', at' H:mm'h'",
          {
            locale: en,
          }
        ),
      },
    });
  }
async handle ( { data } ) { const { appointment } = data ; await Mail . sendMail ( { to : ` ${ appointment . provider . name } ${ appointment . provider . email } ` , subject : 'Appointment cancelled' , template : 'cancelation' , context : { provider : appointment . provider . name , user : appointment . user . name , date : format ( parseISO ( appointment . date ) , "'day' dd 'of' MMMM', at' H:mm'h'" , { locale : en , } ) , } , } ) ; }
Method responsable to process and sent one email
Method responsable to process and sent one email
// Retrieve the appointment data // Send an email to the provider, informing him, that this appointment is available again // html: ''