We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5de76e commit 29e7608Copy full SHA for 29e7608
src/prepend.php
@@ -1,4 +1,7 @@
1
<?php
2
-if ( getenv( 'MAILCATCHER_DOMAIN' ) == '' ) {
3
- putenv( 'MAILCATCHER_DOMAIN=' . array_pop( explode( '@', ini_get( 'sendmail_path' ) ) ) );
4
-}
+if (getenv('MAILCATCHER_DOMAIN') == '') {
+ $sendmail_path = ini_get('sendmail_path');
+ $parts = explode('@', $sendmail_path);
5
+ $mailcatcher_domain = array_pop($parts);
6
+ putenv('MAILCATCHER_DOMAIN=' . $mailcatcher_domain);
7
+}
0 commit comments