asSystem(fn(): mixed => $this->callCreate($email, $name, $authsource, $template)); } protected function callCreate(string $email, string $name, string $authsource, string $template): mixed { [$local, $domain] = explode('@', $email, 2); return mailbox('add', 'mailbox_from_template', ['domain' => $domain, 'local_part' => $local, 'name' => $name, 'authsource' => $authsource, 'template' => $template]); } }