Bearsampp 2026.9.23
Loading...
Searching...
No Matches
BinMailpit Class Reference
Inheritance diagram for BinMailpit:
Collaboration 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 ()
 getId ()
 getName ()
 getRelease ()
 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
 $currentPath
 $rootPath
 $symlinkPath

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

Static Public Member Functions inherited from Module
static clearMemoryCache ()
static invalidateConfigCacheForPath ($sourcePath)
Protected Attributes inherited from Module
 $bearsamppConf
 $bearsamppConfRaw
 $enable
 $name
 $release = 'N/A'
 $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 94 of file class.bin.mailpit.php.

95 {
96 Log::initClass($this);
97 $this->reload($id, $type);
98 }
reload($id=null, $type=null)
static initClass($classInstance)

References Module\$id, Module\$type, Log\initClass(), and reload().

Here is the call graph for this function:

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

265 {
266 global $bearsamppWinbinder;
267
268 if (!Util::isValidPort($port)) {
269 Log::error($this->getName() . ' port not valid: ' . $port);
270
271 return false;
272 }
273
274 $port = intval($port);
275 $bearsamppWinbinder->incrProgressBar($wbProgressBar);
276
277 $isPortInUse = ServiceHelper::isPortInUse($port);
278 if (!$checkUsed || $isPortInUse === false) {
279 // bearsampp.conf
280 $this->setSmtpPort($port);
281 $bearsamppWinbinder->incrProgressBar($wbProgressBar);
282
283 // conf
284 $this->update();
285 $bearsamppWinbinder->incrProgressBar($wbProgressBar);
286
287 return true;
288 }
289
290 Log::debug($this->getName() . ' port in used: ' . $port . ' - ' . $isPortInUse);
291
292 return $isPortInUse;
293 }
$port
setSmtpPort($smtpPort)
static debug($data, $file=null)
static error($data, $file=null)
update($sub=0, $showWindow=false)
static isPortInUse($port)
static isValidPort($port)

References $port, Log\debug(), Log\error(), Module\getName(), ServiceHelper\isPortInUse(), Util\isValidPort(), setSmtpPort(), and Module\update().

Here is the call graph for this function:

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

304 {
305 global $bearsamppLang, $bearsamppWinbinder;
306 $boxTitle = sprintf($bearsamppLang->getValue(Lang::CHECK_PORT_TITLE), $this->getName(), $port);
307
308 if (!Util::isValidPort($port)) {
309 Log::error($this->getName() . ' port not valid: ' . $port);
310
311 return false;
312 }
313
314 $headers = HttpClient::getHeaders($this->listen, $port);
315 if (!empty($headers)) {
316 if (UtilString::contains($headers[0], 'Mailpit')) {
317 Log::debug($this->getName() . ' port ' . $port . ' is used by: ' . str_replace('220 ', '', $headers[0]));
318 if ($showWindow) {
319 $bearsamppWinbinder->messageBoxInfo(
320 sprintf($bearsamppLang->getValue(Lang::PORT_USED_BY), $port, str_replace('220 ', '', $headers[0])),
321 $boxTitle
322 );
323 }
324
325 return true;
326 }
327 Log::debug($this->getName() . ' port ' . $port . ' is used by another application');
328 if ($showWindow) {
329 $bearsamppWinbinder->messageBoxWarning(
330 sprintf($bearsamppLang->getValue(Lang::PORT_NOT_USED_BY), $port),
331 $boxTitle
332 );
333 }
334 } else {
335 Log::debug($this->getName() . ' port ' . $port . ' is not used');
336 if ($showWindow) {
337 $bearsamppWinbinder->messageBoxError(
338 sprintf($bearsamppLang->getValue(Lang::PORT_NOT_USED), $port),
339 $boxTitle
340 );
341 }
342 }
343
344 return false;
345 }
global $bearsamppLang
static getHeaders($host, $port, $ssl=false)
const PORT_NOT_USED
const PORT_NOT_USED_BY
const CHECK_PORT_TITLE
const PORT_USED_BY
static contains($string, $search)

References $bearsamppLang, $port, Lang\CHECK_PORT_TITLE, UtilString\contains(), Log\debug(), Log\error(), HttpClient\getHeaders(), Module\getName(), Util\isValidPort(), Lang\PORT_NOT_USED, Lang\PORT_NOT_USED_BY, and Lang\PORT_USED_BY.

Here is the call graph for this function:

◆ getExe()

getExe ( )

Retrieves the executable file path for the Mailpit service.

Returns
string The executable file path.

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

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

References $exe.

◆ getListen()

getListen ( )

Retrieves the listen address for the Mailpit service.

Returns
string The listen address.

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

562 {
563 return $this->listen;
564 }

References $listen.

◆ getLog()

getLog ( )

Retrieves the log file path for the Mailpit service.

Returns
string The log file path.

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

482 {
483 return $this->log;
484 }

References $log.

◆ getService()

getService ( )

Retrieves the service object for the Mailpit service.

Returns
Win32Service The service object.

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

439 {
440 return $this->service;
441 }

References $service.

◆ getSmtpPort()

getSmtpPort ( )

Retrieves the SMTP port for the Mailpit service.

Returns
int The SMTP port.

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

542 {
543 return $this->smtpPort;
544 }

References $smtpPort.

◆ getUiPort()

getUiPort ( )

Retrieves the UI port for the Mailpit service.

Returns
int The UI port.

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

522 {
523 return $this->uiPort;
524 }

References $uiPort.

◆ getWebRoot()

getWebRoot ( )

Retrieves the web root directory for the Mailpit service.

Returns
string The web root directory.

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

502 {
503 return $this->webRoot;
504 }

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

217 {
218 global $bearsamppRegistry;
219
220 Log::trace("Starting rebuildConf for Mailpit service");
221 Log::trace("Checking if registry key exists for Mailpit service parameters");
222
223 $registryPath = 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters';
224 Log::trace("Registry path: " . $registryPath);
225
226 $exists = $bearsamppRegistry->exists(
228 $registryPath,
230 );
231
232 if ($exists) {
233 Log::trace("Registry key exists, updating service parameters");
234
235 $serviceParams = sprintf(self::SERVICE_PARAMS, $this->listen, $this->uiPort, $this->listen, $this->smtpPort, $this->webRoot);
236 Log::trace("Service parameters: " . $serviceParams);
237
238 $result = $bearsamppRegistry->setExpandStringValue(
240 $registryPath,
242 $serviceParams
243 );
244
245 Log::trace("Registry update " . ($result ? "succeeded" : "failed"));
246
247 return $result;
248 }
249
250 Log::trace("Registry key does not exist for Mailpit service parameters");
251
252 return false;
253 }
$result
static trace($data, $file=null)
const INFO_APP_PARAMETERS
const HKEY_LOCAL_MACHINE

References $result, Registry\HKEY_LOCAL_MACHINE, Nssm\INFO_APP_PARAMETERS, and Log\trace().

Referenced by setVersion().

Here is the call graph for this function:
Here is the caller graph for this function:

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

107 {
109 Log::reloadClass($this);
110
111 $this->name = $bearsamppLang->getValue(Lang::MAILPIT);
112 $this->version = $bearsamppConfig->getRaw(self::ROOT_CFG_VERSION);
113 parent::reload($id, $type);
114
115 $this->enable = $this->enable && $bearsamppConfig->getRaw(self::ROOT_CFG_ENABLE);
116 $this->service = new Win32Service(self::SERVICE_NAME);
117 $this->log = Path::getLogsPath() . '/mailpit.log';
118
119 if ($this->bearsamppConfRaw !== false) {
120 $this->exe = $this->symlinkPath . '/' . $this->bearsamppConfRaw[self::LOCAL_CFG_EXE];
121 $this->webRoot = $this->bearsamppConfRaw[self::LOCAL_CFG_WEB_ROOT];
122 $this->uiPort = intval($this->bearsamppConfRaw[self::LOCAL_CFG_UI_PORT]);
123 $this->smtpPort = intval($this->bearsamppConfRaw[self::LOCAL_CFG_SMTP_PORT]);
124 $this->listen = $this->bearsamppConfRaw[self::LOCAL_CFG_LISTEN];
125 }
126
127 if (!$this->enable) {
128 Log::info($this->name . ' is not enabled!');
129
130 return;
131 }
132 if (!is_dir($this->currentPath)) {
133 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_FILE_NOT_FOUND), $this->name . ' ' . $this->version, $this->currentPath));
134
135 return;
136 }
137 if (!is_dir($this->symlinkPath)) {
138 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_FILE_NOT_FOUND), $this->name . ' ' . $this->version, $this->symlinkPath));
139
140 return;
141 }
142 if (!is_file($this->bearsamppConf)) {
143 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_CONF_NOT_FOUND), $this->name . ' ' . $this->version, $this->bearsamppConf));
144
145 return;
146 }
147 if (!is_file($this->exe)) {
148 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_EXE_NOT_FOUND), $this->name . ' ' . $this->version, $this->exe));
149
150 return;
151 }
152 if ((empty($this->webRoot) && $this->webRoot !== '' || is_numeric($this->webRoot))) {
153 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_INVALID_PARAMETER), self::LOCAL_CFG_WEB_ROOT, $this->webRoot));
154
155 return;
156 }
157 if (empty($this->uiPort)) {
158 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_INVALID_PARAMETER), self::LOCAL_CFG_UI_PORT, $this->uiPort));
159
160 return;
161 }
162 if (empty($this->smtpPort)) {
163 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_INVALID_PARAMETER), self::LOCAL_CFG_SMTP_PORT, $this->smtpPort));
164
165 return;
166 }
167 if (empty($this->listen)) {
168 Log::error(sprintf($bearsamppLang->getValue(Lang::ERROR_INVALID_PARAMETER), self::LOCAL_CFG_LISTEN, $this->listen));
169
170 return;
171 }
172
173 $nssm = new Nssm(self::SERVICE_NAME);
174 $nssm->setDisplayName(APP_TITLE . ' ' . $this->getName());
175 $nssm->setBinPath($this->exe);
176 $nssm->setParams(sprintf(self::SERVICE_PARAMS, $this->listen, $this->uiPort, $this->listen, $this->smtpPort, $this->webRoot));
177 $nssm->setStart(Nssm::SERVICE_DEMAND_START);
178 $nssm->setStdout(Path::getLogsPath() . '/mailpit.out.log');
179 $nssm->setStderr(Path::getLogsPath() . '/mailpit.err.log');
180
181 $this->service->setNssm($nssm);
182 }
global $bearsamppRoot
const ERROR_EXE_NOT_FOUND
const ERROR_CONF_NOT_FOUND
const ERROR_INVALID_PARAMETER
const ERROR_FILE_NOT_FOUND
const MAILPIT
static info($data, $file=null)
static reloadClass($classInstance)
const SERVICE_DEMAND_START
static getLogsPath($aetrayPath=false)
global $bearsamppConfig
Definition homepage.php:46
const APP_TITLE
Definition root.php:19

References $bearsamppConfig, $bearsamppLang, $bearsamppRoot, Module\$id, Module\$type, APP_TITLE, Log\error(), Lang\ERROR_CONF_NOT_FOUND, Lang\ERROR_EXE_NOT_FOUND, Lang\ERROR_FILE_NOT_FOUND, Lang\ERROR_INVALID_PARAMETER, Path\getLogsPath(), Module\getName(), Log\info(), Lang\MAILPIT, Log\reloadClass(), and Nssm\SERVICE_DEMAND_START.

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

Here is the call graph for this function:
Here is the caller graph for this function:

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

190 {
191 $content = file_get_contents($this->bearsamppConf);
192
193 foreach ($params as $key => $value) {
194 $content = preg_replace('|' . $key . ' = .*|', $key . ' = ' . '"' . $value . '"', $content);
195 $this->bearsamppConfRaw[$key] = $value;
196 switch ($key) {
197 case self::LOCAL_CFG_UI_PORT:
198 $this->uiPort = intval($value);
199 break;
200 case self::LOCAL_CFG_SMTP_PORT:
201 $this->smtpPort = intval($value);
202 break;
203 }
204 }
205
206 file_put_contents($this->bearsamppConf, $content);
207
208 self::invalidateConfigCacheForPath($this->bearsamppConf);
209 }
static invalidateConfigCacheForPath($sourcePath)

References Module\invalidateConfigCacheForPath().

Here is the call graph for this function:

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

450 {
451 global $bearsamppConfig, $bearsamppLang, $bearsamppWinbinder;
452
453 if ($enabled == Config::ENABLED && !is_dir($this->currentPath)) {
454 Log::debug($this->getName() . ' cannot be enabled because bundle ' . $this->getVersion() . ' does not exist in ' . $this->currentPath);
455 if ($showWindow) {
456 $bearsamppWinbinder->messageBoxError(
457 sprintf($bearsamppLang->getValue(Lang::ENABLE_BUNDLE_NOT_EXIST), $this->getName(), $this->getVersion(), $this->currentPath),
458 sprintf($bearsamppLang->getValue(Lang::ENABLE_TITLE), $this->getName())
459 );
460 }
461 $enabled = Config::DISABLED;
462 }
463
464 Log::info($this->getName() . ' switched to ' . ($enabled == Config::ENABLED ? 'enabled' : 'disabled'));
465 $this->enable = $enabled == Config::ENABLED;
466 $bearsamppConfig->replace(self::ROOT_CFG_ENABLE, $enabled);
467
468 $this->reload();
469 if ($this->enable) {
470 ServiceHelper::installService($this, $this->smtpPort, null, $showWindow);
471 } else {
472 ServiceHelper::removeService($this->service, $this->name);
473 }
474 }
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, Log\debug(), Config\DISABLED, Lang\ENABLE_BUNDLE_NOT_EXIST, Lang\ENABLE_TITLE, Config\ENABLED, Module\getName(), Module\getVersion(), Log\info(), ServiceHelper\installService(), reload(), and ServiceHelper\removeService().

Here is the call graph for this function:

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

572 {
573 return $this->replace(self::LOCAL_CFG_LISTEN, $this->listen);
574 }
replace($key, $value)

References Module\replace().

Here is the call graph for this function:

◆ setSmtpPort()

setSmtpPort ( $smtpPort)

Sets the SMTP port for the Mailpit service.

Parameters
int$smtpPortThe SMTP port to set.

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

552 {
553 $this->replace(self::LOCAL_CFG_SMTP_PORT, $smtpPort);
554 }

References $smtpPort, and Module\replace().

Referenced by changePort().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUiPort()

setUiPort ( $uiPort)

Sets the UI port for the Mailpit service.

Parameters
int$uiPortThe UI port to set.

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

532 {
533 $this->replace(self::LOCAL_CFG_UI_PORT, $uiPort);
534 }

References $uiPort, and Module\replace().

Here is the call graph for this function:

◆ setVersion()

setVersion ( $version)

Sets the version of the Mailpit service.

Parameters
string$versionThe version to set.

Reimplemented from Module.

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

422 {
423 global $bearsamppConfig;
424 $this->version = $version;
425 $bearsamppConfig->replace(self::ROOT_CFG_VERSION, $version);
426 $this->reload();
427
428 // Rebuild NSSM configuration after version change
429 Log::trace('Rebuilding Mailpit NSSM configuration after version switch');
430 $this->rebuildConf();
431 }

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

Referenced by updateConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWebRoot()

setWebRoot ( $webRoot)

Sets the web root directory for the Mailpit service.

Parameters
string$webRootThe web root directory to set.

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

512 {
513 $this->replace(self::LOCAL_CFG_WEB_ROOT, $webRoot);
514 }

References $webRoot, and Module\replace().

Here is the call graph for this function:

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

356 {
357 Log::debug('Switch ' . $this->name . ' version to ' . $version);
358
359 return $this->updateConfig($version, 0, $showWindow);
360 }
updateConfig($version=null, $sub=0, $showWindow=false)

References Module\$version, Log\debug(), and updateConfig().

Here is the call graph for this function:

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

372 {
373 global $bearsamppLang, $bearsamppWinbinder;
374
375 if (!$this->enable) {
376 return true;
377 }
378
379 $version = $version == null ? $this->version : $version;
380 Log::debug(($sub > 0 ? str_repeat(' ', 2 * $sub) : '') . 'Update ' . $this->name . ' ' . $version . ' config');
381
382 $boxTitle = sprintf($bearsamppLang->getValue(Lang::SWITCH_VERSION_TITLE), $this->getName(), $version);
383
384 $bearsamppConf = str_replace('mailpit' . $this->getVersion(), 'mailpit' . $version, $this->bearsamppConf);
385 if (!file_exists($bearsamppConf)) {
386 Log::error('bearsampp config files not found for ' . $this->getName() . ' ' . $version);
387 if ($showWindow) {
388 $bearsamppWinbinder->messageBoxError(
389 sprintf($bearsamppLang->getValue(Lang::BEARSAMPP_CONF_NOT_FOUND_ERROR), $this->getName() . ' ' . $version),
390 $boxTitle
391 );
392 }
393
394 return false;
395 }
396
397 $bearsamppConfRaw = parse_ini_file($bearsamppConf);
398 if ($bearsamppConfRaw === false || !isset($bearsamppConfRaw[self::ROOT_CFG_VERSION]) || $bearsamppConfRaw[self::ROOT_CFG_VERSION] != $version) {
399 Log::error('bearsampp config file malformed for ' . $this->getName() . ' ' . $version);
400 if ($showWindow) {
401 $bearsamppWinbinder->messageBoxError(
402 sprintf($bearsamppLang->getValue(Lang::BEARSAMPP_CONF_MALFORMED_ERROR), $this->getName() . ' ' . $version),
403 $boxTitle
404 );
405 }
406
407 return false;
408 }
409
410 // bearsampp.conf
411 $this->setVersion($version);
412
413 return true;
414 }
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, Log\debug(), Log\error(), Module\getName(), Module\getVersion(), setVersion(), and Lang\SWITCH_VERSION_TITLE.

Referenced by switchVersion().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ $exe

$exe
private

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

Referenced by getExe().

◆ $listen

$listen
private

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

Referenced by getListen().

◆ $log

$log
private

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

Referenced by getLog().

◆ $service

$service
private

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

Referenced by getService().

◆ $smtpPort

$smtpPort
private

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

Referenced by getSmtpPort(), and setSmtpPort().

◆ $uiPort

$uiPort
private

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

Referenced by getUiPort(), and setUiPort().

◆ $webRoot

$webRoot
private

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

Referenced by getWebRoot(), and setWebRoot().

◆ LOCAL_CFG_EXE

const LOCAL_CFG_EXE = 'mailpitExe'

Configuration key for the Mailpit executable in the local configuration.

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

◆ LOCAL_CFG_LISTEN

const LOCAL_CFG_LISTEN = 'mailpitListen'

Configuration key for the Mailpit listen address in the local configuration.

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

◆ LOCAL_CFG_SMTP_PORT

const LOCAL_CFG_SMTP_PORT = 'mailpitSmtpPort'

Configuration key for the Mailpit SMTP port in the local configuration.

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

◆ LOCAL_CFG_UI_PORT

const LOCAL_CFG_UI_PORT = 'mailpitUiPort'

Configuration key for the Mailpit UI port in the local configuration.

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

◆ LOCAL_CFG_WEB_ROOT

const LOCAL_CFG_WEB_ROOT = 'mailpitWebRoot'

Configuration key for the Mailpit web root in the local configuration.

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

◆ ROOT_CFG_ENABLE

const ROOT_CFG_ENABLE = 'mailpitEnable'

Configuration key for the Mailpit enable flag in the root configuration.

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

◆ ROOT_CFG_VERSION

const ROOT_CFG_VERSION = 'mailpitVersion'

Configuration key for the Mailpit version in the root configuration.

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

◆ SERVICE_NAME

◆ SERVICE_PARAMS

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

The command line parameters passed to the Mailpit service.

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


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