Let's add support for previewing emails sent by PHP in Playground.
Catching email in PHP-wasm
PHP sends emails either using the sendmail command, or using the SMTP protocol.
WordPress defaults to sendmail, but we should still support SMTP for cases where plugins use SMTP, and in PHP-wasm to support other frameworks that use SMTP.
Displaying email
In the Playground website we can add a new tab with a simple UI to display captured emails.
The UI should correctly display email info including HTML content and attachments.
For the CLI we have a couple of options. We could print emails in stdout, we could have a UI like Mailhog or Playground website mail UI, or we could save emails in .eml files and let users open them using email clients.
Let's add support for previewing emails sent by PHP in Playground.
Catching email in PHP-wasm
PHP sends emails either using the
sendmailcommand, or using the SMTP protocol.WordPress defaults to sendmail, but we should still support SMTP for cases where plugins use SMTP, and in PHP-wasm to support other frameworks that use SMTP.
Displaying email
In the Playground website we can add a new tab with a simple UI to display captured emails.
The UI should correctly display email info including HTML content and attachments.
For the CLI we have a couple of options. We could print emails in stdout, we could have a UI like Mailhog or Playground website mail UI, or we could save emails in
.emlfiles and let users open them using email clients.