Skip to content

Commit 29e7608

Browse files
committed
wip
1 parent d5de76e commit 29e7608

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/prepend.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2-
if ( getenv( 'MAILCATCHER_DOMAIN' ) == '' ) {
3-
putenv( 'MAILCATCHER_DOMAIN=' . array_pop( explode( '@', ini_get( 'sendmail_path' ) ) ) );
4-
}
2+
if (getenv('MAILCATCHER_DOMAIN') == '') {
3+
$sendmail_path = ini_get('sendmail_path');
4+
$parts = explode('@', $sendmail_path);
5+
$mailcatcher_domain = array_pop($parts);
6+
putenv('MAILCATCHER_DOMAIN=' . $mailcatcher_domain);
7+
}

0 commit comments

Comments
 (0)