How to upgrade the configuration setup for the Cyp...
# i-need-help
c
The documentation in https://github.com/bahmutov/cypress-email-results only shows how to set up Cypress for older versions. Cypress +10 requires a different configuration and I cant get it to work. This is what I got, but it doesn't work:
Copy code
js
const { defineConfig } = require("cypress")
const nodemailer = require("nodemailer")
const mg = require("nodemailer-mailgun-transport")

require('dotenv').config()

const mailgunAuth = {
  auth: {
    api_key: process.env.MAILGUN_API_KEY,
    domain: "mydomain.com"
  }
}

const transport = nodemailer.createTransport(mg(mailgunAuth))

module.exports = defineConfig({
  projectId: 'XXX',
  e2e: {
    setupNodeEvents(on, config) {
      // implement node event listeners here
      require('cypress-email-results')(on, config, {
        email: [
          'test@example.com',
        ],
        emailOnSuccess: false,
        dry: true,
        transport,
      })
  },
  video: false,
  viewportWidth: 1280,
  viewportHeight: 720,
});
Any idea how to fix it?
I got it working. Had a syntax error and something wrong with the Mailgun transport library.