public function SendMail(string $toLoginName, string $mailBody)
    {
        $result = $this->ExecuteCall("SendMail", (object)[
            "toLoginName" => $toLoginName,
            "mailBody" => $mailBody
        ], GnResponseType::Json, FALSE, PHP_INT_MAX);

        $this->ClearCacheForActionNames($this::CLEAR_CACHE_PATTERNS);

        return $result;
    }
public function SendMail(string $toLoginName, string $mailBody)
    {
        $result = $this->ExecuteCall("SendMail", (object)[
            "toLoginName" => $toLoginName,
            "mailBody" => $mailBody
        ], GnResponseType::Json, FALSE, PHP_INT_MAX);

        $this->ClearCacheForActionNames($this::CLEAR_CACHE_PATTERNS);

        return $result;
    }
public function SendMail ( string $ toLoginName , string $ mailBody ) { $ result = $ this -> ExecuteCall ( "SendMail" , ( object ) [ "toLoginName" => $ toLoginName , "mailBody" => $ mailBody ] , GnResponseType :: Json , FALSE , PHP_INT_MAX ) ; $ this -> ClearCacheForActionNames ( $ this :: CLEAR_CACHE_PATTERNS ) ; return $ result ; }
Send a message from the logged-in user - or the community-creator, to the receiver.

Sending to an explicit group-of-logins is not allowed.
However, you can send the message to your main- or sub-community, like: toLoginName = "%www.geohamster.com"
You might want to prohibit sending (SPAM..) mails to whole sub/community from your users.
If you're careful (controlled UI), user sending to sub/community is also a chat-technique.

@param string $toLoginName
To whom to send the message. The receiving user MUST have joined already your main or sub-community.
@param string $mailBody
The message body.
@return string
Send a message from the logged - in user - or the community - creator to the receiver .