parent
ef3feef634
commit
a0c19b759b
@ -9,6 +9,7 @@ services:
|
|||||||
dns: 4.2.2.4
|
dns: 4.2.2.4
|
||||||
volumes:
|
volumes:
|
||||||
- "./entrypoint.sh:/usr/local/bin/entrypoint.sh:z"
|
- "./entrypoint.sh:/usr/local/bin/entrypoint.sh:z"
|
||||||
|
- "./mailhog-smtp.php:/var/www/html/wp-content/mu-plugins/mailhog-smtp.php:z"
|
||||||
- "./wp-content:/var/www/html/wp-content/:z"
|
- "./wp-content:/var/www/html/wp-content/:z"
|
||||||
- "./composer.json:/var/www/html/composer.json:z"
|
- "./composer.json:/var/www/html/composer.json:z"
|
||||||
- "./composer.lock:/var/www/html/composer.lock:z"
|
- "./composer.lock:/var/www/html/composer.lock:z"
|
||||||
|
22
mailhog-smtp.php
Normal file
22
mailhog-smtp.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
// Send outgoing mails through Mailhog
|
||||||
|
|
||||||
|
function action_wp_mail_failed($wp_error) {
|
||||||
|
print_r($wp_error, true);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
add_action('wp_mail_failed', 'action_wp_mail_failed', 10, 1);
|
||||||
|
|
||||||
|
add_action('phpmailer_init', function ($phpmailer) {
|
||||||
|
$phpmailer->isSMTP();
|
||||||
|
$phpmailer->SMTPAuth = false;
|
||||||
|
$phpmailer->SMTPSecure = false;
|
||||||
|
$phpmailer->SMTPAutoTLS = false;
|
||||||
|
$phpmailer->Host = "mailhog";
|
||||||
|
$phpmailer->Port = 1025;
|
||||||
|
$phpmailer->From = "noreply@radhr.localhost";
|
||||||
|
$phpmailer->FromName = "noreply@radhr.localhost";
|
||||||
|
$phpmailer->Username = null;
|
||||||
|
$phpmailer->Password = null;
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user