Skip to content

Cypress Mailer Setup Instructions

Robert Clark edited this page Oct 22, 2018 · 5 revisions

These instructions are for Cypress v3 which is not the latest version of Cypress. In Cypress v4, you can configure email settings by navigating to Admin > Application Settings > Edit Application Settings .

Mailer setup instructions:

  1. Set up your email account.

    • Any email account with an SMTP server will work (Gmail, Outlook, etc.).
    • We'll use Gmail for this tutorial.
    • If you're using a Gmail account, it works best with 2 Factor Authentication turned on; this helps the mailer work with some Gmail security settings.
  2. Open <app_directory>/config/cypress.yml on the server in your favorite text editor.

    • This file will allow you to set the mailer settings; setting mailer settings through the web admin pane is currently not supported (settings changes will not be persisted to disk)
  3. In the website_domain and website_port fields, replace <%= ENV["WEBSITE_DOMAIN"] %> with the URL of your Cypress instance (hostname or IP address), and <%= ENV["WEBSITE_PORT"] %> with the port the webserver is running on (usually 80).

  4. In the mailer_address field, replace <%= ENV["MAILER_ADDRESS"] %> with the URL of your SMTP server.

    • In Gmail, the mailer_address is smtp.gmail.com
  5. In the mailer_port field, replace <%= ENV["MAILER_PORT"] %> with the port for the SMTP server.

    • If you're using Gmail, this will be 587, the port for TLS/STARTTLS access to the SMTP server.
    • Use of TLS/STARTTLS is recommended for security reasons.
  6. In the mailer_domain field, replace <%= ENV["MAILER_DOMAIN"] %> with the email address domain.

  7. In the mailer_user_name and mailer_password field,s replace <%= ENV["MAILER_USER_NAME"] %> with the username for the email account, and <%= ENV["MAILER_PASSWORD"] %> with the email account password.

  8. Save cypress.yml.

  9. Restart the Cypress server.

Clone this wiki locally