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

Add mock email server to development environment #2622

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

williamjallen
Copy link
Collaborator

Email testing is currently difficult in the CDash development environment, with developers having to set up their own local email servers for testing purposes. This PR adds a mailpit container to the Docker development environment so developers can inspect the emails sent by a local CDash server at http://localhost:8025.

@josephsnyder
Copy link
Member

@williamjallen, this starts up nicely but I can't see any emails come into the window using docker/mysql.

Can we get the documentation updated with any further steps that need to be taken to use this?

@williamjallen
Copy link
Collaborator Author

@josephsnyder there shouldn't be any more steps needed long-term. For now, it looks like the CDash function used to send mail currently returns when in debug mode. You could either try running CDash in production mode, or add a custom email command somewhere to try things out. I used something along the lines of this for example:

Mail::raw('test', function ($message) {
    $message->to('[email protected]')->subject('test');
});

I have another PR queued up behind this one, which will remove the function I linked above and allow all emails sent as part of the suite to show up in mailpit.

Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the APP_DEBUG pointer. Much better!

@josephsnyder josephsnyder added this pull request to the merge queue Dec 18, 2024
Merged via the queue into Kitware:master with commit eaf6e55 Dec 18, 2024
6 checks passed
@williamjallen williamjallen deleted the development-mail-server branch December 18, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants