2024.8.23
Loading...
Searching...
No Matches
BinMailhog Class Reference
+ Inheritance diagram for BinMailhog:
+ Collaboration diagram for BinMailhog:

Public Member Functions

 __construct ($id, $type)
 
 changePort ($port, $checkUsed=false, $wbProgressBar=null)
 
 checkPort ($port, $showWindow=false)
 
 getApiPort ()
 
 getExe ()
 
 getLog ()
 
 getMailPath ()
 
 getService ()
 
 getSmtpPort ()
 
 getUiPort ()
 
 rebuildConf ()
 
 reload ($id=null, $type=null)
 
 setApiPort ($apiPort)
 
 setEnable ($enabled, $showWindow=false)
 
 setSmtpPort ($smtpPort)
 
 setUiPort ($uiPort)
 
 setVersion ($version)
 
 switchVersion ($version, $showWindow=false)
 
- Public Member Functions inherited from Module
 __toString ()
 
 getCurrentPath ()
 
 getId ()
 
 getName ()
 
 getRelease ()
 
 getRootPath ()
 
 getSymlinkPath ()
 
 getType ()
 
 getVersion ()
 
 getVersionList ()
 
 isEnable ()
 
 update ($sub=0, $showWindow=false)
 

Data Fields

const LOCAL_CFG_API_PORT = 'mailhogApiPort'
 
const LOCAL_CFG_EXE = 'mailhogExe'
 
const LOCAL_CFG_SMTP_PORT = 'mailhogSmtpPort'
 
const LOCAL_CFG_UI_PORT = 'mailhogUiPort'
 
const ROOT_CFG_ENABLE = 'mailhogEnable'
 
const ROOT_CFG_VERSION = 'mailhogVersion'
 
const SERVICE_NAME = 'bearsamppmailhog'
 
const SERVICE_PARAMS = '-hostname localhost -api-bind-addr 127.0.0.1:%d -ui-bind-addr 127.0.0.1:%d -smtp-bind-addr 127.0.0.1:%d -storage maildir -maildir-path "%s"'
 
- Data Fields inherited from Module
const BUNDLE_RELEASE = 'bundleRelease'
 

Protected Member Functions

 replaceAll ($params)
 
 updateConfig ($version=null, $sub=0, $showWindow=false)
 
- Protected Member Functions inherited from Module
 __construct ()
 
 replace ($key, $value)
 

Private Attributes

 $apiPort
 
 $exe
 
 $log
 
 $mailPath
 
 $service
 
 $smtpPort
 
 $uiPort
 

Additional Inherited Members

- Protected Attributes inherited from Module
 $bearsamppConf
 
 $bearsamppConfRaw
 
 $currentPath
 
 $enable
 
 $name
 
 $release = 'N/A'
 
 $rootPath
 
 $symlinkPath
 
 $version
 

Detailed Description

Class BinMailhog

This class represents the Mailhog module in the Bearsampp application. It handles the configuration, initialization, and management of the Mailhog service.

Definition at line 16 of file class.bin.mailhog.php.

Constructor & Destructor Documentation

◆ __construct()

BinMailhog::__construct ( $id,
$type )

Constructs a BinMailhog object and initializes the module.

Parameters
string$idThe ID of the module.
string$typeThe type of the module.

Definition at line 44 of file class.bin.mailhog.php.

45 {
46 Util::logInitClass( $this );
47 $this->reload( $id, $type );
48 }
reload($id=null, $type=null)
static logInitClass($classInstance)

References Module\$id, Module\$type, Util\logInitClass(), and reload().

Member Function Documentation

◆ changePort()

BinMailhog::changePort ( $port,
$checkUsed = false,
$wbProgressBar = null )

Changes the SMTP port for the Mailhog service.

Parameters
int$portThe new port number.
bool$checkUsedWhether to check if the port is already in use.
mixed$wbProgressBarThe progress bar object for UI updates.
Returns
bool|int True if the port was successfully changed, or the process using the port if in use.

Definition at line 192 of file class.bin.mailhog.php.

193 {
194 global $bearsamppWinbinder;
195
196 if ( !Util::isValidPort( $port ) ) {
197 Util::logError( $this->getName() . ' port not valid: ' . $port );
198
199 return false;
200 }
201
202 $port = intval( $port );
203 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
204
205 $isPortInUse = Util::isPortInUse( $port );
206 if ( !$checkUsed || $isPortInUse === false ) {
207 // bearsampp.conf
208 $this->setSmtpPort( $port );
209 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
210
211 // conf
212 $this->update();
213 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
214
215 return true;
216 }
217
218 Util::logDebug( $this->getName() . ' port in used: ' . $port . ' - ' . $isPortInUse );
219
220 return $isPortInUse;
221 }
$port
setSmtpPort($smtpPort)
update($sub=0, $showWindow=false)
static logError($data, $file=null)
static isValidPort($port)
static logDebug($data, $file=null)
static isPortInUse($port)

References $port, Module\getName(), Util\isPortInUse(), Util\isValidPort(), Util\logDebug(), Util\logError(), setSmtpPort(), and Module\update().

◆ checkPort()

BinMailhog::checkPort ( $port,
$showWindow = false )

Checks if a specific port is used by the Mailhog service.

Parameters
int$portThe port number to check.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the port is used by Mailhog, false otherwise.

Definition at line 231 of file class.bin.mailhog.php.

232 {
233 global $bearsamppLang, $bearsamppWinbinder;
234 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::CHECK_PORT_TITLE ), $this->getName(), $port );
235
236 if ( !Util::isValidPort( $port ) ) {
237 Util::logError( $this->getName() . ' port not valid: ' . $port );
238
239 return false;
240 }
241
242 $headers = Util::getHeaders( '127.0.0.1', $port );
243 if ( !empty( $headers ) ) {
244 if ( Util::contains( $headers[0], 'MailHog' ) ) {
245 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by: ' . str_replace( '220 ', '', $headers[0] ) );
246 if ( $showWindow ) {
247 $bearsamppWinbinder->messageBoxInfo(
248 sprintf( $bearsamppLang->getValue( Lang::PORT_USED_BY ), $port, str_replace( '220 ', '', $headers[0] ) ),
249 $boxTitle
250 );
251 }
252
253 return true;
254 }
255 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by another application' );
256 if ( $showWindow ) {
257 $bearsamppWinbinder->messageBoxWarning(
258 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED_BY ), $port ),
259 $boxTitle
260 );
261 }
262 }
263 else {
264 Util::logDebug( $this->getName() . ' port ' . $port . ' is not used' );
265 if ( $showWindow ) {
266 $bearsamppWinbinder->messageBoxError(
267 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED ), $port ),
268 $boxTitle
269 );
270 }
271 }
272
273 return false;
274 }
global $bearsamppLang
const PORT_NOT_USED_BY
const CHECK_PORT_TITLE
const PORT_USED_BY
const PORT_NOT_USED
static getHeaders($host, $port, $ssl=false)
static contains($string, $search)

References $bearsamppLang, $port, Lang\CHECK_PORT_TITLE, Util\contains(), Util\getHeaders(), Module\getName(), Util\isValidPort(), Util\logDebug(), Util\logError(), Lang\PORT_NOT_USED, Lang\PORT_NOT_USED_BY, and Lang\PORT_USED_BY.

◆ getApiPort()

BinMailhog::getApiPort ( )

Gets the API port for the Mailhog service.

Returns
int The API port.

Definition at line 427 of file class.bin.mailhog.php.

428 {
429 return $this->apiPort;
430 }

References $apiPort.

◆ getExe()

BinMailhog::getExe ( )

Gets the executable file path for the Mailhog service.

Returns
string The executable file path.

Definition at line 417 of file class.bin.mailhog.php.

418 {
419 return $this->exe;
420 }

References $exe.

◆ getLog()

BinMailhog::getLog ( )

Gets the log file path for the Mailhog service.

Returns
string The log file path.

Definition at line 407 of file class.bin.mailhog.php.

408 {
409 return $this->log;
410 }

References $log.

◆ getMailPath()

BinMailhog::getMailPath ( )

Gets the mail directory path for the Mailhog service.

This method returns the path to the directory where Mailhog stores its mail data. The path is typically set during the initialization or reloading of the module and is based on the application's root temporary path.

Returns
string The mail directory path.

Definition at line 491 of file class.bin.mailhog.php.

492 {
493 return $this->mailPath;
494 }

References $mailPath.

◆ getService()

BinMailhog::getService ( )

Gets the Win32Service object for the Mailhog service.

Returns
Win32Service The Win32Service object.

Definition at line 363 of file class.bin.mailhog.php.

364 {
365 return $this->service;
366 }

References $service.

◆ getSmtpPort()

BinMailhog::getSmtpPort ( )

Gets the SMTP port for the Mailhog service.

Returns
int The SMTP port.

Definition at line 467 of file class.bin.mailhog.php.

468 {
469 return $this->smtpPort;
470 }

References $smtpPort.

◆ getUiPort()

BinMailhog::getUiPort ( )

Gets the UI port for the Mailhog service.

Returns
int The UI port.

Definition at line 447 of file class.bin.mailhog.php.

448 {
449 return $this->uiPort;
450 }

References $uiPort.

◆ rebuildConf()

BinMailhog::rebuildConf ( )

Rebuilds the configuration in the Windows Registry.

Returns
bool True if the configuration was successfully rebuilt, false otherwise.

Definition at line 162 of file class.bin.mailhog.php.

163 {
164 global $bearsamppRegistry;
165
166 $exists = $bearsamppRegistry->exists(
168 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters',
170 );
171 if ( $exists ) {
172 return $bearsamppRegistry->setExpandStringValue(
174 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters',
176 sprintf( self::SERVICE_PARAMS, $this->apiPort, $this->uiPort, $this->smtpPort, $this->mailPath )
177 );
178 }
179
180 return false;
181 }
const INFO_APP_PARAMETERS
const HKEY_LOCAL_MACHINE

References Registry\HKEY_LOCAL_MACHINE, and Nssm\INFO_APP_PARAMETERS.

◆ reload()

BinMailhog::reload ( $id = null,
$type = null )

Reloads the module configuration based on the provided ID and type.

Parameters
string | null$idThe ID of the module. If null, the current ID is used.
string | null$typeThe type of the module. If null, the current type is used.

Reimplemented from Module.

Definition at line 56 of file class.bin.mailhog.php.

57 {
59 Util::logReloadClass( $this );
60
61 $this->name = $bearsamppLang->getValue( Lang::MAILHOG );
62 $this->version = $bearsamppConfig->getRaw( self::ROOT_CFG_VERSION );
63 parent::reload( $id, $type );
64
65 $this->enable = $this->enable && $bearsamppConfig->getRaw( self::ROOT_CFG_ENABLE );
66 $this->service = new Win32Service( self::SERVICE_NAME );
67 $this->mailPath = $bearsamppRoot->getTmpPath() . '/mailhog';
68 $this->log = $bearsamppRoot->getLogsPath() . '/mailhog.log';
69
70 if ( $this->bearsamppConfRaw !== false ) {
71 $this->exe = $this->symlinkPath . '/' . $this->bearsamppConfRaw[self::LOCAL_CFG_EXE];
72 $this->apiPort = intval( $this->bearsamppConfRaw[self::LOCAL_CFG_API_PORT] );
73 $this->uiPort = intval( $this->bearsamppConfRaw[self::LOCAL_CFG_UI_PORT] );
74 $this->smtpPort = intval( $this->bearsamppConfRaw[self::LOCAL_CFG_SMTP_PORT] );
75 }
76
77 if ( !$this->enable ) {
78 Util::logInfo( $this->name . ' is not enabled!' );
79
80 return;
81 }
82 if ( !is_dir( $this->currentPath ) ) {
83 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_FILE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->currentPath ) );
84
85 return;
86 }
87 if ( !is_dir( $this->symlinkPath ) ) {
88 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_FILE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->symlinkPath ) );
89
90 return;
91 }
92 if ( !is_file( $this->bearsamppConf ) ) {
93 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_CONF_NOT_FOUND ), $this->name . ' ' . $this->version, $this->bearsamppConf ) );
94
95 return;
96 }
97 if ( !is_file( $this->exe ) ) {
98 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_EXE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->exe ) );
99
100 return;
101 }
102 if ( empty( $this->apiPort ) ) {
103 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_API_PORT, $this->apiPort ) );
104
105 return;
106 }
107 if ( empty( $this->uiPort ) ) {
108 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_UI_PORT, $this->uiPort ) );
109
110 return;
111 }
112 if ( empty( $this->smtpPort ) ) {
113 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_SMTP_PORT, $this->smtpPort ) );
114
115 return;
116 }
117
118 $nssm = new Nssm( self::SERVICE_NAME );
119 $nssm->setDisplayName( APP_TITLE . ' ' . $this->getName() );
120 $nssm->setBinPath( $this->exe );
121 $nssm->setParams( sprintf( self::SERVICE_PARAMS, $this->apiPort, $this->uiPort, $this->smtpPort, $this->mailPath ) );
122 $nssm->setStart( Nssm::SERVICE_DEMAND_START );
123 $nssm->setStdout( $bearsamppRoot->getLogsPath() . '/mailhog.out.log' );
124 $nssm->setStderr( $bearsamppRoot->getLogsPath() . '/mailhog.err.log' );
125
126 $this->service->setNssm( $nssm );
127 }
global $bearsamppRoot
const ERROR_FILE_NOT_FOUND
const ERROR_INVALID_PARAMETER
const MAILHOG
const ERROR_CONF_NOT_FOUND
const ERROR_EXE_NOT_FOUND
const SERVICE_DEMAND_START
static logReloadClass($classInstance)
static logInfo($data, $file=null)
global $bearsamppConfig
Definition homepage.php:26
const APP_TITLE
Definition root.php:12

References $bearsamppConfig, $bearsamppLang, $bearsamppRoot, Module\$id, Module\$type, APP_TITLE, Lang\ERROR_CONF_NOT_FOUND, Lang\ERROR_EXE_NOT_FOUND, Lang\ERROR_FILE_NOT_FOUND, Lang\ERROR_INVALID_PARAMETER, Module\getName(), LOCAL_CFG_EXE, Util\logError(), Util\logInfo(), Util\logReloadClass(), Lang\MAILHOG, and Nssm\SERVICE_DEMAND_START.

Referenced by __construct(), setEnable(), and setVersion().

+ Here is the caller graph for this function:

◆ replaceAll()

BinMailhog::replaceAll ( $params)
protected

Replaces multiple key-value pairs in the configuration file.

Parameters
array$paramsAn associative array of key-value pairs to replace.

Reimplemented from Module.

Definition at line 134 of file class.bin.mailhog.php.

135 {
136 $content = file_get_contents( $this->bearsamppConf );
137
138 foreach ( $params as $key => $value ) {
139 $content = preg_replace( '|' . $key . ' = .*|', $key . ' = ' . '"' . $value . '"', $content );
140 $this->bearsamppConfRaw[$key] = $value;
141 switch ( $key ) {
143 $this->apiPort = intval( $value );
144 break;
146 $this->uiPort = intval( $value );
147 break;
149 $this->smtpPort = intval( $value );
150 break;
151 }
152 }
153
154 file_put_contents( $this->bearsamppConf, $content );
155 }
const LOCAL_CFG_SMTP_PORT

References LOCAL_CFG_API_PORT, LOCAL_CFG_SMTP_PORT, and LOCAL_CFG_UI_PORT.

◆ setApiPort()

BinMailhog::setApiPort ( $apiPort)

Sets the API port for the Mailhog service.

Parameters
int$apiPortThe new API port.

Definition at line 437 of file class.bin.mailhog.php.

438 {
439 $this->replace( self::LOCAL_CFG_API_PORT, $apiPort );
440 }
replace($key, $value)

References $apiPort, and Module\replace().

◆ setEnable()

BinMailhog::setEnable ( $enabled,
$showWindow = false )

Enables or disables the Mailhog service.

Parameters
bool$enabledWhether to enable or disable the service.
bool$showWindowWhether to show a message box with the result.

Definition at line 374 of file class.bin.mailhog.php.

375 {
376 global $bearsamppConfig, $bearsamppLang, $bearsamppWinbinder;
377
378 if ( $enabled == Config::ENABLED && !is_dir( $this->currentPath ) ) {
379 Util::logDebug( $this->getName() . ' cannot be enabled because bundle ' . $this->getVersion() . ' does not exist in ' . $this->currentPath );
380 if ( $showWindow ) {
381 $bearsamppWinbinder->messageBoxError(
382 sprintf( $bearsamppLang->getValue( Lang::ENABLE_BUNDLE_NOT_EXIST ), $this->getName(), $this->getVersion(), $this->currentPath ),
383 sprintf( $bearsamppLang->getValue( Lang::ENABLE_TITLE ), $this->getName() )
384 );
385 }
386 $enabled = Config::DISABLED;
387 }
388
389 Util::logInfo( $this->getName() . ' switched to ' . ($enabled == Config::ENABLED ? 'enabled' : 'disabled') );
390 $this->enable = $enabled == Config::ENABLED;
391 $bearsamppConfig->replace( self::ROOT_CFG_ENABLE, $enabled );
392
393 $this->reload();
394 if ( $this->enable ) {
395 Util::installService( $this, $this->smtpPort, null, $showWindow );
396 }
397 else {
398 Util::removeService( $this->service, $this->name );
399 }
400 }
const DISABLED
const ENABLED
const ENABLE_TITLE
const ENABLE_BUNDLE_NOT_EXIST
static installService($bin, $port, $syntaxCheckCmd, $showWindow=false)
static removeService($service, $name)

References $bearsamppConfig, $bearsamppLang, Config\DISABLED, Lang\ENABLE_BUNDLE_NOT_EXIST, Lang\ENABLE_TITLE, Config\ENABLED, Module\getName(), Module\getVersion(), Util\installService(), Util\logDebug(), Util\logInfo(), reload(), and Util\removeService().

◆ setSmtpPort()

BinMailhog::setSmtpPort ( $smtpPort)

Sets the SMTP port for the Mailhog service.

Parameters
int$smtpPortThe new SMTP port.

Definition at line 477 of file class.bin.mailhog.php.

478 {
479 $this->replace( self::LOCAL_CFG_SMTP_PORT, $smtpPort );
480 }

References $smtpPort, and Module\replace().

Referenced by changePort().

+ Here is the caller graph for this function:

◆ setUiPort()

BinMailhog::setUiPort ( $uiPort)

Sets the UI port for the Mailhog service.

Parameters
int$uiPortThe new UI port.

Definition at line 457 of file class.bin.mailhog.php.

458 {
459 $this->replace( self::LOCAL_CFG_UI_PORT, $uiPort );
460 }

References $uiPort, and Module\replace().

◆ setVersion()

BinMailhog::setVersion ( $version)

Sets the version of the Mailhog service.

Parameters
string$versionThe version to set.

Reimplemented from Module.

Definition at line 350 of file class.bin.mailhog.php.

351 {
352 global $bearsamppConfig;
353 $this->version = $version;
354 $bearsamppConfig->replace( self::ROOT_CFG_VERSION, $version );
355 $this->reload();
356 }

References $bearsamppConfig, Module\$version, and reload().

Referenced by updateConfig().

+ Here is the caller graph for this function:

◆ switchVersion()

BinMailhog::switchVersion ( $version,
$showWindow = false )

Switches the version of the Mailhog service.

Parameters
string$versionThe version to switch to.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the version was successfully switched, false otherwise.

Definition at line 284 of file class.bin.mailhog.php.

285 {
286 Util::logDebug( 'Switch ' . $this->name . ' version to ' . $version );
287
288 return $this->updateConfig( $version, 0, $showWindow );
289 }
updateConfig($version=null, $sub=0, $showWindow=false)

References Module\$version, Util\logDebug(), and updateConfig().

◆ updateConfig()

BinMailhog::updateConfig ( $version = null,
$sub = 0,
$showWindow = false )
protected

Updates the configuration of the Mailhog service.

Parameters
string | null$versionThe version to update to. If null, the current version is used.
int$subThe sub-level for logging indentation.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the configuration was successfully updated, false otherwise.

Reimplemented from Module.

Definition at line 300 of file class.bin.mailhog.php.

301 {
302 global $bearsamppLang, $bearsamppWinbinder;
303
304 if ( !$this->enable ) {
305 return true;
306 }
307
308 $version = $version == null ? $this->version : $version;
309 Util::logDebug( ($sub > 0 ? str_repeat( ' ', 2 * $sub ) : '') . 'Update ' . $this->name . ' ' . $version . ' config' );
310
311 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::SWITCH_VERSION_TITLE ), $this->getName(), $version );
312
313 $bearsamppConf = str_replace( 'mailhog' . $this->getVersion(), 'mailhog' . $version, $this->bearsamppConf );
314 if ( !file_exists( $bearsamppConf ) ) {
315 Util::logError( 'bearsampp config files not found for ' . $this->getName() . ' ' . $version );
316 if ( $showWindow ) {
317 $bearsamppWinbinder->messageBoxError(
318 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_NOT_FOUND_ERROR ), $this->getName() . ' ' . $version ),
319 $boxTitle
320 );
321 }
322
323 return false;
324 }
325
326 $bearsamppConfRaw = parse_ini_file( $bearsamppConf );
327 if ( $bearsamppConfRaw === false || !isset( $bearsamppConfRaw[self::ROOT_CFG_VERSION] ) || $bearsamppConfRaw[self::ROOT_CFG_VERSION] != $version ) {
328 Util::logError( 'bearsampp config file malformed for ' . $this->getName() . ' ' . $version );
329 if ( $showWindow ) {
330 $bearsamppWinbinder->messageBoxError(
331 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_MALFORMED_ERROR ), $this->getName() . ' ' . $version ),
332 $boxTitle
333 );
334 }
335
336 return false;
337 }
338
339 // bearsampp.conf
340 $this->setVersion( $version );
341
342 return true;
343 }
setVersion($version)
const BEARSAMPP_CONF_NOT_FOUND_ERROR
const SWITCH_VERSION_TITLE
const BEARSAMPP_CONF_MALFORMED_ERROR

References Module\$bearsamppConf, Module\$bearsamppConfRaw, $bearsamppLang, Module\$version, Lang\BEARSAMPP_CONF_MALFORMED_ERROR, Lang\BEARSAMPP_CONF_NOT_FOUND_ERROR, Module\getName(), Module\getVersion(), Util\logDebug(), Util\logError(), setVersion(), and Lang\SWITCH_VERSION_TITLE.

Referenced by switchVersion().

+ Here is the caller graph for this function:

Field Documentation

◆ $apiPort

BinMailhog::$apiPort
private

Definition at line 33 of file class.bin.mailhog.php.

Referenced by getApiPort(), and setApiPort().

◆ $exe

BinMailhog::$exe
private

Definition at line 32 of file class.bin.mailhog.php.

Referenced by getExe().

◆ $log

BinMailhog::$log
private

Definition at line 30 of file class.bin.mailhog.php.

Referenced by getLog().

◆ $mailPath

BinMailhog::$mailPath
private

Definition at line 36 of file class.bin.mailhog.php.

Referenced by getMailPath().

◆ $service

BinMailhog::$service
private

Definition at line 29 of file class.bin.mailhog.php.

Referenced by getService().

◆ $smtpPort

BinMailhog::$smtpPort
private

Definition at line 35 of file class.bin.mailhog.php.

Referenced by getSmtpPort(), and setSmtpPort().

◆ $uiPort

BinMailhog::$uiPort
private

Definition at line 34 of file class.bin.mailhog.php.

Referenced by getUiPort(), and setUiPort().

◆ LOCAL_CFG_API_PORT

const BinMailhog::LOCAL_CFG_API_PORT = 'mailhogApiPort'

Definition at line 25 of file class.bin.mailhog.php.

Referenced by replaceAll().

◆ LOCAL_CFG_EXE

const BinMailhog::LOCAL_CFG_EXE = 'mailhogExe'

Definition at line 24 of file class.bin.mailhog.php.

Referenced by reload().

◆ LOCAL_CFG_SMTP_PORT

const BinMailhog::LOCAL_CFG_SMTP_PORT = 'mailhogSmtpPort'

Definition at line 27 of file class.bin.mailhog.php.

Referenced by replaceAll().

◆ LOCAL_CFG_UI_PORT

const BinMailhog::LOCAL_CFG_UI_PORT = 'mailhogUiPort'

Definition at line 26 of file class.bin.mailhog.php.

Referenced by replaceAll().

◆ ROOT_CFG_ENABLE

const BinMailhog::ROOT_CFG_ENABLE = 'mailhogEnable'

Definition at line 21 of file class.bin.mailhog.php.

◆ ROOT_CFG_VERSION

const BinMailhog::ROOT_CFG_VERSION = 'mailhogVersion'

Definition at line 22 of file class.bin.mailhog.php.

◆ SERVICE_NAME

◆ SERVICE_PARAMS

const BinMailhog::SERVICE_PARAMS = '-hostname localhost -api-bind-addr 127.0.0.1:%d -ui-bind-addr 127.0.0.1:%d -smtp-bind-addr 127.0.0.1:%d -storage maildir -maildir-path "%s"'

Definition at line 19 of file class.bin.mailhog.php.


The documentation for this class was generated from the following file: