feat: catch emails sent locally using Mailhog (#8470)
* feat: added mailhog to catch emails sent locally * fix: added new line at the end of packages/emails/docker-compose.yml * chore: removed EMAIL_SERVER_USER and EMAIL_SERVER_PASSWORD for local usage with Mailhog --------- Co-authored-by: Keith Williams <keithwillcode@gmail.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/8739/head^2
parent
c6ab889b98
commit
3c46c39114
12
.env.example
12
.env.example
|
@ -138,12 +138,16 @@ API_KEY_PREFIX=cal_
|
||||||
EMAIL_FROM='notifications@yourselfhostedcal.com'
|
EMAIL_FROM='notifications@yourselfhostedcal.com'
|
||||||
|
|
||||||
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
# Configure SMTP settings (@see https://nodemailer.com/smtp/).
|
||||||
|
# Configuration to receive emails locally (mailhog)
|
||||||
|
EMAIL_SERVER_HOST='localhost'
|
||||||
|
EMAIL_SERVER_PORT=1025
|
||||||
|
|
||||||
# Note: The below configuration for Office 365 has been verified to work.
|
# Note: The below configuration for Office 365 has been verified to work.
|
||||||
EMAIL_SERVER_HOST='smtp.office365.com'
|
# EMAIL_SERVER_HOST='smtp.office365.com'
|
||||||
EMAIL_SERVER_PORT=587
|
# EMAIL_SERVER_PORT=587
|
||||||
EMAIL_SERVER_USER='<office365_emailAddress>'
|
# EMAIL_SERVER_USER='<office365_emailAddress>'
|
||||||
# Keep in mind that if you have 2FA enabled, you will need to provision an App Password.
|
# Keep in mind that if you have 2FA enabled, you will need to provision an App Password.
|
||||||
EMAIL_SERVER_PASSWORD='<office365_password>'
|
# EMAIL_SERVER_PASSWORD='<office365_password>'
|
||||||
|
|
||||||
# The following configuration for Gmail has been verified to work.
|
# The following configuration for Gmail has been verified to work.
|
||||||
# EMAIL_SERVER_HOST='smtp.gmail.com'
|
# EMAIL_SERVER_HOST='smtp.gmail.com'
|
||||||
|
|
|
@ -200,6 +200,12 @@ echo 'NEXT_PUBLIC_DEBUG=1' >> .env
|
||||||
```sh
|
```sh
|
||||||
yarn workspace @calcom/prisma db-deploy
|
yarn workspace @calcom/prisma db-deploy
|
||||||
```
|
```
|
||||||
|
1. Run [mailhog](https://github.com/mailhog/MailHog) to view emails sent during development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull mailhog/mailhog
|
||||||
|
docker run -d -p 8025:8025 -p 1025:1025 mailhog/mailhog
|
||||||
|
```
|
||||||
|
|
||||||
1. Run (in development mode)
|
1. Run (in development mode)
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Starts mailhog SMTP server on port 1025, web interface on port 8025
|
||||||
|
version: "3.6"
|
||||||
|
services:
|
||||||
|
mailhog:
|
||||||
|
image: 'mailhog/mailhog:latest'
|
||||||
|
ports:
|
||||||
|
- "1025:1025"
|
||||||
|
- "8025:8025"
|
|
@ -3,6 +3,9 @@
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dx": "docker compose up -d"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@calcom/dayjs": "*",
|
"@calcom/dayjs": "*",
|
||||||
"@calcom/lib": "*",
|
"@calcom/lib": "*",
|
||||||
|
|
Loading…
Reference in New Issue