Bearsampp 2025.8.29
Loading...
Searching...
No Matches
BinMailpit Class Reference
Inheritance diagram for BinMailpit:

Public Member Functions

 __construct ($id, $type)
 changePort ($port, $checkUsed=false, $wbProgressBar=null)
 checkPort ($port, $showWindow=false)
 getExe ()
 getListen ()
 getLog ()
 getService ()
 getSmtpPort ()
 getUiPort ()
 getWebRoot ()
 rebuildConf ()
 reload ($id=null, $type=null)
 setEnable ($enabled, $showWindow=false)
 setListen ()
 setSmtpPort ($smtpPort)
 setUiPort ($uiPort)
 setVersion ($version)
 setWebRoot ($webRoot)
 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_EXE = 'mailpitExe'
const LOCAL_CFG_LISTEN = 'mailpitListen'
const LOCAL_CFG_SMTP_PORT = 'mailpitSmtpPort'
const LOCAL_CFG_UI_PORT = 'mailpitUiPort'
const LOCAL_CFG_WEB_ROOT = 'mailpitWebRoot'
const ROOT_CFG_ENABLE = 'mailpitEnable'
const ROOT_CFG_VERSION = 'mailpitVersion'
const SERVICE_NAME = 'bearsamppmailpit'
const SERVICE_PARAMS = ' --listen "%s:%d" --smtp "%s:%d" --webroot "%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

 $exe
 $listen
 $log
 $service
 $smtpPort
 $uiPort
 $webRoot

Additional Inherited Members

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

Detailed Description

Class BinMailpit

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

Definition at line 17 of file class.bin.mailpit.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $id,
$type )

Constructs a BinMailpit object and initializes the module.

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

Definition at line 46 of file class.bin.mailpit.php.

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

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

Member Function Documentation

◆ changePort()

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

Changes the SMTP port for the Mailpit 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 it is in use.

Definition at line 212 of file class.bin.mailpit.php.

213 {
214 global $bearsamppWinbinder;
215
216 if ( !Util::isValidPort( $port ) ) {
217 Util::logError( $this->getName() . ' port not valid: ' . $port );
218
219 return false;
220 }
221
222 $port = intval( $port );
223 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
224
225 $isPortInUse = Util::isPortInUse( $port );
226 if ( !$checkUsed || $isPortInUse === false ) {
227 // bearsampp.conf
228 $this->setSmtpPort( $port );
229 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
230
231 // conf
232 $this->update();
233 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
234
235 return true;
236 }
237
238 Util::logDebug( $this->getName() . ' port in used: ' . $port . ' - ' . $isPortInUse );
239
240 return $isPortInUse;
241 }
$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()

checkPort ( $port,
$showWindow = false )

Checks if the specified port is used by the Mailpit 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 the Mailpit service, false otherwise.

Definition at line 251 of file class.bin.mailpit.php.

252 {
253 global $bearsamppLang, $bearsamppWinbinder;
254 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::CHECK_PORT_TITLE ), $this->getName(), $port );
255
256 if ( !Util::isValidPort( $port ) ) {
257 Util::logError( $this->getName() . ' port not valid: ' . $port );
258
259 return false;
260 }
261
262 $headers = Util::getHeaders( $this->listen, $port );
263 if ( !empty( $headers ) ) {
264 if ( Util::contains( $headers[0], 'Mailpit' ) ) {
265 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by: ' . str_replace( '220 ', '', $headers[0] ) );
266 if ( $showWindow ) {
267 $bearsamppWinbinder->messageBoxInfo(
268 sprintf( $bearsamppLang->getValue( Lang::PORT_USED_BY ), $port, str_replace( '220 ', '', $headers[0] ) ),
269 $boxTitle
270 );
271 }
272
273 return true;
274 }
275 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by another application' );
276 if ( $showWindow ) {
277 $bearsamppWinbinder->messageBoxWarning(
278 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED_BY ), $port ),
279 $boxTitle
280 );
281 }
282 }
283 else {
284 Util::logDebug( $this->getName() . ' port ' . $port . ' is not used' );
285 if ( $showWindow ) {
286 $bearsamppWinbinder->messageBoxError(
287 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED ), $port ),
288 $boxTitle
289 );
290 }
291 }
292
293 return false;
294 }
global $bearsamppLang
const PORT_NOT_USED
const PORT_NOT_USED_BY
const CHECK_PORT_TITLE
const PORT_USED_BY
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.

◆ getExe()

getExe ( )

Retrieves the executable file path for the Mailpit service.

Returns
string The executable file path.

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

438 {
439 return $this->exe;
440 }

References $exe.

◆ getListen()

getListen ( )

Retrieves the listen address for the Mailpit service.

Returns
string The listen address.

Definition at line 507 of file class.bin.mailpit.php.

508 {
509 return $this->listen;
510 }

References $listen.

◆ getLog()

getLog ( )

Retrieves the log file path for the Mailpit service.

Returns
string The log file path.

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

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

References $log.

◆ getService()

getService ( )

Retrieves the service object for the Mailpit service.

Returns
Win32Service The service object.

Definition at line 383 of file class.bin.mailpit.php.

384 {
385 return $this->service;
386 }

References $service.

◆ getSmtpPort()

getSmtpPort ( )

Retrieves the SMTP port for the Mailpit service.

Returns
int The SMTP port.

Definition at line 487 of file class.bin.mailpit.php.

488 {
489 return $this->smtpPort;
490 }

References $smtpPort.

◆ getUiPort()

getUiPort ( )

Retrieves the UI port for the Mailpit service.

Returns
int The UI port.

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

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

References $uiPort.

◆ getWebRoot()

getWebRoot ( )

Retrieves the web root directory for the Mailpit service.

Returns
string The web root directory.

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

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

References $webRoot.

◆ rebuildConf()

rebuildConf ( )

Rebuilds the configuration for the Mailpit service in the Windows Registry.

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

Definition at line 166 of file class.bin.mailpit.php.

167 {
168 global $bearsamppRegistry;
169
170 Util::logTrace("Starting rebuildConf for Mailpit service");
171 Util::logTrace("Checking if registry key exists for Mailpit service parameters");
172
173 $registryPath = 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters';
174 Util::logTrace("Registry path: " . $registryPath);
175
176 $exists = $bearsamppRegistry->exists(
178 $registryPath,
180 );
181
182 if ( $exists ) {
183 Util::logTrace("Registry key exists, updating service parameters");
184
185 $serviceParams = sprintf(self::SERVICE_PARAMS, $this->listen, $this->uiPort, $this->listen, $this->smtpPort, $this->webRoot);
186 Util::logTrace("Service parameters: " . $serviceParams);
187
188 $result = $bearsamppRegistry->setExpandStringValue(
190 $registryPath,
192 $serviceParams
193 );
194
195 Util::logTrace("Registry update " . ($result ? "succeeded" : "failed"));
196 return $result;
197 }
198
199 Util::logTrace("Registry key does not exist for Mailpit service parameters");
200 return false;
201 }
$result
const INFO_APP_PARAMETERS
const HKEY_LOCAL_MACHINE
static logTrace($data, $file=null)

References $result, Registry\HKEY_LOCAL_MACHINE, Nssm\INFO_APP_PARAMETERS, and Util\logTrace().

◆ reload()

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 58 of file class.bin.mailpit.php.

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

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(), Util\logError(), Util\logInfo(), Util\logReloadClass(), Lang\MAILPIT, and Nssm\SERVICE_DEMAND_START.

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

◆ replaceAll()

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 141 of file class.bin.mailpit.php.

142 {
143 $content = file_get_contents( $this->bearsamppConf );
144
145 foreach ( $params as $key => $value ) {
146 $content = preg_replace( '|' . $key . ' = .*|', $key . ' = ' . '"' . $value . '"', $content );
147 $this->bearsamppConfRaw[$key] = $value;
148 switch ( $key ) {
149 case self::LOCAL_CFG_UI_PORT:
150 $this->uiPort = intval( $value );
151 break;
152 case self::LOCAL_CFG_SMTP_PORT:
153 $this->smtpPort = intval( $value );
154 break;
155 }
156 }
157
158 file_put_contents( $this->bearsamppConf, $content );
159 }

◆ setEnable()

setEnable ( $enabled,
$showWindow = false )

Enables or disables the Mailpit service.

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

Definition at line 394 of file class.bin.mailpit.php.

395 {
396 global $bearsamppConfig, $bearsamppLang, $bearsamppWinbinder;
397
398 if ( $enabled == Config::ENABLED && !is_dir( $this->currentPath ) ) {
399 Util::logDebug( $this->getName() . ' cannot be enabled because bundle ' . $this->getVersion() . ' does not exist in ' . $this->currentPath );
400 if ( $showWindow ) {
401 $bearsamppWinbinder->messageBoxError(
402 sprintf( $bearsamppLang->getValue( Lang::ENABLE_BUNDLE_NOT_EXIST ), $this->getName(), $this->getVersion(), $this->currentPath ),
403 sprintf( $bearsamppLang->getValue( Lang::ENABLE_TITLE ), $this->getName() )
404 );
405 }
406 $enabled = Config::DISABLED;
407 }
408
409 Util::logInfo( $this->getName() . ' switched to ' . ($enabled == Config::ENABLED ? 'enabled' : 'disabled') );
410 $this->enable = $enabled == Config::ENABLED;
411 $bearsamppConfig->replace( self::ROOT_CFG_ENABLE, $enabled );
412
413 $this->reload();
414 if ( $this->enable ) {
415 Util::installService( $this, $this->smtpPort, null, $showWindow );
416 }
417 else {
418 Util::removeService( $this->service, $this->name );
419 }
420 }
const DISABLED
const ENABLED
const ENABLE_BUNDLE_NOT_EXIST
const ENABLE_TITLE
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().

◆ setListen()

setListen ( )

Sets the listen address for the Mailpit service.

Returns
bool True if the listen address was successfully set, false otherwise.

Definition at line 517 of file class.bin.mailpit.php.

518 {
519 return $this->replace( self::LOCAL_CFG_LISTEN, $this->listen );
520 }
replace($key, $value)

References Module\replace().

◆ setSmtpPort()

setSmtpPort ( $smtpPort)

Sets the SMTP port for the Mailpit service.

Parameters
int$smtpPortThe SMTP port to set.

Definition at line 497 of file class.bin.mailpit.php.

498 {
499 $this->replace( self::LOCAL_CFG_SMTP_PORT, $smtpPort );
500 }

References $smtpPort, and Module\replace().

Referenced by changePort().

◆ setUiPort()

setUiPort ( $uiPort)

Sets the UI port for the Mailpit service.

Parameters
int$uiPortThe UI port to set.

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

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

References $uiPort, and Module\replace().

◆ setVersion()

setVersion ( $version)

Sets the version of the Mailpit service.

Parameters
string$versionThe version to set.

Reimplemented from Module.

Definition at line 370 of file class.bin.mailpit.php.

371 {
372 global $bearsamppConfig;
373 $this->version = $version;
374 $bearsamppConfig->replace( self::ROOT_CFG_VERSION, $version );
375 $this->reload();
376 }

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

Referenced by updateConfig().

◆ setWebRoot()

setWebRoot ( $webRoot)

Sets the web root directory for the Mailpit service.

Parameters
string$webRootThe web root directory to set.

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

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

References $webRoot, and Module\replace().

◆ switchVersion()

switchVersion ( $version,
$showWindow = false )

Switches the version of the Mailpit 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 304 of file class.bin.mailpit.php.

305 {
306 Util::logDebug( 'Switch ' . $this->name . ' version to ' . $version );
307
308 return $this->updateConfig( $version, 0, $showWindow );
309 }
updateConfig($version=null, $sub=0, $showWindow=false)

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

◆ updateConfig()

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

Updates the configuration for the Mailpit 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 320 of file class.bin.mailpit.php.

321 {
322 global $bearsamppLang, $bearsamppWinbinder;
323
324 if ( !$this->enable ) {
325 return true;
326 }
327
328 $version = $version == null ? $this->version : $version;
329 Util::logDebug( ($sub > 0 ? str_repeat( ' ', 2 * $sub ) : '') . 'Update ' . $this->name . ' ' . $version . ' config' );
330
331 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::SWITCH_VERSION_TITLE ), $this->getName(), $version );
332
333 $bearsamppConf = str_replace( 'mailpit' . $this->getVersion(), 'mailpit' . $version, $this->bearsamppConf );
334 if ( !file_exists( $bearsamppConf ) ) {
335 Util::logError( 'bearsampp config files not found for ' . $this->getName() . ' ' . $version );
336 if ( $showWindow ) {
337 $bearsamppWinbinder->messageBoxError(
338 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_NOT_FOUND_ERROR ), $this->getName() . ' ' . $version ),
339 $boxTitle
340 );
341 }
342
343 return false;
344 }
345
346 $bearsamppConfRaw = parse_ini_file( $bearsamppConf );
347 if ( $bearsamppConfRaw === false || !isset( $bearsamppConfRaw[self::ROOT_CFG_VERSION] ) || $bearsamppConfRaw[self::ROOT_CFG_VERSION] != $version ) {
348 Util::logError( 'bearsampp config file malformed for ' . $this->getName() . ' ' . $version );
349 if ( $showWindow ) {
350 $bearsamppWinbinder->messageBoxError(
351 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_MALFORMED_ERROR ), $this->getName() . ' ' . $version ),
352 $boxTitle
353 );
354 }
355
356 return false;
357 }
358
359 // bearsampp.conf
360 $this->setVersion( $version );
361
362 return true;
363 }
setVersion($version)
const BEARSAMPP_CONF_MALFORMED_ERROR
const BEARSAMPP_CONF_NOT_FOUND_ERROR
const SWITCH_VERSION_TITLE

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().

Field Documentation

◆ $exe

$exe
private

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

Referenced by getExe().

◆ $listen

$listen
private

Definition at line 38 of file class.bin.mailpit.php.

Referenced by getListen().

◆ $log

$log
private

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

Referenced by getLog().

◆ $service

$service
private

Definition at line 31 of file class.bin.mailpit.php.

Referenced by getService().

◆ $smtpPort

$smtpPort
private

Definition at line 37 of file class.bin.mailpit.php.

Referenced by getSmtpPort(), and setSmtpPort().

◆ $uiPort

$uiPort
private

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

Referenced by getUiPort(), and setUiPort().

◆ $webRoot

$webRoot
private

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

Referenced by getWebRoot(), and setWebRoot().

◆ LOCAL_CFG_EXE

const LOCAL_CFG_EXE = 'mailpitExe'

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

◆ LOCAL_CFG_LISTEN

const LOCAL_CFG_LISTEN = 'mailpitListen'

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

◆ LOCAL_CFG_SMTP_PORT

const LOCAL_CFG_SMTP_PORT = 'mailpitSmtpPort'

Definition at line 28 of file class.bin.mailpit.php.

◆ LOCAL_CFG_UI_PORT

const LOCAL_CFG_UI_PORT = 'mailpitUiPort'

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

◆ LOCAL_CFG_WEB_ROOT

const LOCAL_CFG_WEB_ROOT = 'mailpitWebRoot'

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

◆ ROOT_CFG_ENABLE

const ROOT_CFG_ENABLE = 'mailpitEnable'

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

◆ ROOT_CFG_VERSION

const ROOT_CFG_VERSION = 'mailpitVersion'

Definition at line 23 of file class.bin.mailpit.php.

◆ SERVICE_NAME

◆ SERVICE_PARAMS

const SERVICE_PARAMS = ' --listen "%s:%d" --smtp "%s:%d" --webroot "%s"'

Definition at line 20 of file class.bin.mailpit.php.


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