-
Notifications
You must be signed in to change notification settings - Fork 34
First commit: just trying out an email server. #1207
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
base: trunk
Are you sure you want to change the base?
Conversation
8ff4e7f
to
21fe069
Compare
vendor/wp-now/src/wp-now.ts
Outdated
path.posix.join( PLAYGROUND_INTERNAL_MU_PLUGINS_FOLDER, '0-wp-mail.php' ), | ||
`<?php | ||
add_filter( 'wp_mail', function( $args ) { | ||
$response = wp_remote_post( 'http://localhost:7777/email', array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: the port number should be dynamic.
It's set in the app.
- PHP const?
- WP option?
- ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking this should be copied to /mu-plugins/
for each separate site.
This would simplify setting internal constants for the port number.
Also, users might want use a customized or other local email server.
…d readability. Enhance ContentTabSettings with email configuration details and a user-friendly message about the email service. Remove unused mu-plugin related to email functionality.
21fe069
to
7104c3c
Compare
src/lib/email-server.ts
Outdated
const app = express(); | ||
app.use( express.json() ); | ||
|
||
// @TODO: service should be configurable via Studio settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default would be Ethereal catch all for all sites.
Should sites be able to use separate email services? For example, a user might want site x
to use gmail and not care about other sites?
Or should settings affect all sites?
Related issues
Proposed Changes
Just testing forwarding WordPress emails to nodemailer.
The first iteration created a dedicated express server.
The second sets up a route on each site's express app. Each site has dedicated email host settings. This is more flexible as it allows users to set up different accounts for each site.
Questions/TODOs:
Should the port be dynamic? What would this look like?we can set up a route on each site's express serverTesting Instructions
Add an email and app password (use Gmail for testing, it's easier)
Click on WP Admin link on a site.
Then add a user, making sure to send them an email.
See if it works.
Pre-merge Checklist