Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Jun 12, 2024
2 parents 40aacc4 + e18dfa5 commit 2ff20f2
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion docs/config/smtp.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,30 @@ or
bin/magento config:set system/smtp/transport smtp
bin/magento config:set system/smtp/host 127.0.0.1
bin/magento config:set system/smtp/port 1025
```
```

## WordPress

Save the following code to a file in the [mu-plugins](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/) directory (e.g. `smtp.php`):

```php
<?php
/**
* Plugin Name: MU Buggregator SMTP
*/

if (! defined('WP_ENVIRONMENT_TYPE') || 'local' !== WP_ENVIRONMENT_TYPE) {
return;
}

/**
* Send emails to Buggregator
*
* @param \PHPMailer $phpmailer The PHPMailer instance (passed by reference).
*/
add_action( 'phpmailer_init', function( $phpmailer ) : void {
$phpmailer->isSMTP();
$phpmailer->Host = '127.0.0.1';
$phpmailer->Port = 1025;
} );
```

0 comments on commit 2ff20f2

Please sign in to comment.