/bin/bash -eux if [ ! -e ./wp-content/mu-plugins/mail.php ]; then mkdir ./wp-content/mu-plugins cat > ./wp-content/mu-plugins/mail.php <<-EOF isSMTP(); \$phpmailer->SMTPAuth = true; \$phpmailer->Host = "${MAIL_HOST}"; \$phpmailer->Port = "${MAIL_PORT}"; \$phpmailer->Username = "${MAIL_USER}"; \$phpmailer->Password = "${MAIL_PASS}"; // Encryption system to use - ssl or tls \$phpmailer->SMTPSecure = "${MAIL_SECURITY}"; \$phpmailer->From = "${MAIL_USER}"; \$phpmailer->FromName = "WordPress Admin"; } ?> EOF fi docker-entrypoint.sh php-fpm