Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace MailHog with Mailpit, provide global router port configuration, fixes #4827, fixes #5220, for #4701 #5313

Merged
merged 24 commits into from
Sep 6, 2023

Conversation

rfay
Copy link
Member

@rfay rfay commented Aug 31, 2023

The Issue

How This PR Solves The Issue

  • Use Mailpit instead of unmaintained MailHog
  • Provide global configuration for Mailpit router ports
  • Retire the fork of mailhog, ddev/mailhog

All I wanted to do was retire the fork. But it still didn't have a decent arm64 download. So I just kept going. Used up my day!

Manual Testing Instructions

Use ddev launch -m as usual

Automated Testing Overview

Added TestMailpit - there was nothing previously

Release concerns

This invalidates https://github.com/tyler36/ddev-mailpit although it's possible it would still be compatible.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file enhancement labels Aug 31, 2023
@github-actions
Copy link

github-actions bot commented Aug 31, 2023

@rfay rfay changed the title feat: replace ailHog with MailPit, provide global router port configuration, fixes #4827, fixes #5220, for #4701 feat: replace MailHog with MailPit, provide global router port configuration, fixes #4827, fixes #5220, for #4701 Aug 31, 2023
@rfay rfay force-pushed the 20230831_replace_mailhog_with_mailpit branch from cd496af to 318429d Compare August 31, 2023 21:52
@rfay rfay mentioned this pull request Sep 1, 2023
6 tasks
@rfay rfay marked this pull request as ready for review September 1, 2023 13:12
@rfay rfay requested review from a team as code owners September 1, 2023 13:12

# host_mailhog_port: "8025"
# The mailhog port is not normally bound on the host at all, instead being routed
# host_mailpit_port: "8025"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the least used configuration because this is the first time I see it.
There is no documentation for it (except for DDEV_HOST_MAILPIT_PORT) and no such option in ddev config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the doc. Agreed it's mighty obscure.

@tyler36
Copy link
Collaborator

tyler36 commented Sep 4, 2023

Confirmed, works OOTB on Drupal 10.

Test

Service

  1. Confirm version of DDEV.
$ ddev -v
ddev version v1.22.1-58-g3a427fd30
  1. Install Drupal following quickstart
mkdir my-drupal10-site
cd my-drupal10-site
ddev config --project-type=drupal10 --docroot=web --create-docroot
ddev start
ddev composer create drupal/recommended-project
ddev composer require drush/drush
ddev drush site:install --account-name=admin --account-pass=admin -y
ddev drush uli
ddev launch
  1. In browser, navigate to "Log in", and select "Reset your password"
  2. Enter a fake email: "admin@example.com"
  3. Open Mailpit page via command: ddev launch -m
  4. Confirm mail recieved.
  5. Attempt to reset another password: "admin2@example.com"
  6. Confirm chrome notification from Mailpit.

Status

  1. Confirmed display in status
$ ddev status
...
├──────────┼──────┼────────────────────────────────────────────────────────────────────┼────────────────────┤
│ Mailpit  │      │ Mailpit: https://eca-d10-demo.ddev.site:8026                       │                    │
│          │      │ `ddev launch -m`                                                   │                    │
├──────────┼──────┼────────────────────────────────────────────────────────────────────┼────────────────────┤
...

Copy link
Collaborator

@mattstein mattstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some minor capitalization issues, but otherwise looks good to me!

docs/content/users/usage/commands.md Outdated Show resolved Hide resolved
docs/content/users/usage/commands.md Outdated Show resolved Hide resolved
docs/content/users/usage/managing-projects.md Outdated Show resolved Hide resolved
@mattstein mattstein changed the title feat: replace MailHog with MailPit, provide global router port configuration, fixes #4827, fixes #5220, for #4701 feat: replace MailHog with Mailpit, provide global router port configuration, fixes #4827, fixes #5220, for #4701 Sep 5, 2023
@rfay
Copy link
Member Author

rfay commented Sep 5, 2023

I changed mailpit-port to mailpit-http-port, etc.

@rfay rfay force-pushed the 20230831_replace_mailhog_with_mailpit branch from 4d5fa38 to 81418fc Compare September 6, 2023 01:54
@rfay rfay merged commit 120cbe5 into ddev:master Sep 6, 2023
16 checks passed
@rfay rfay deleted the 20230831_replace_mailhog_with_mailpit branch September 6, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants