Documentation

Webmail
in package

Table of Contents

__construct()  : mixed
setIsVisibleForDomainCallback()  : $this
A callback function that decides whether webmail should be visible for a domain or not.
setLoginLinkTemplate()  : $this
Mustache template that will generate the login link to the webmail in Plesk UI.

Methods

__construct()

public __construct(string $name, string $displayName) : mixed
Parameters
$name : string

Webmail name that will be used as an identifier of this webmail. Must be unique within the extension.

$displayName : string

Name that will be displayed in Plesk UI.

Return values
mixed

setIsVisibleForDomainCallback()

A callback function that decides whether webmail should be visible for a domain or not.

public setIsVisibleForDomainCallback(callable $callback) : $this
Parameters
$callback : callable

Callback that takes \pm_Domain as an argument and returns a boolean value.

Tags
since
18.0.47
Return values
$this

setLoginLinkTemplate()

Mustache template that will generate the login link to the webmail in Plesk UI.

public setLoginLinkTemplate(string $loginLinkTemplate) : $this

For example: {{ protocol }}://webmail.{{ domainName }}/index.php?login={{ fullMailName }} Available context:

  • domainName: string, domain name of the selected domain
  • mailName: string, local part of the email
  • fullMailName: string, full email address, urlencoded (e.g. user%40example.com)
  • protocol: string, either "http", or "https"
Parameters
$loginLinkTemplate : string
Tags
since
18.0.47
Return values
$this

Search results