Поддержка серверов

MAIL: методы, функции, константы класса Битрикс


Блог разработчика

9 августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

События модуля mail

СобытиеВызывается
OnGetFilterListCMailFilter::GetFilterList

Константы модуля mail

КонстантаПроверяется
BX_MAIL_DEFAULT_CHARSETCMailHeader::Parse

Список функций и методов модуля mail

Метод
CMailDomainRegistrar::__construct()
CMailDomainRegistrar::isDomainExists($user, $password, $domain, &$error)
CMailDomainRegistrar::suggestDomain($user, $password, $word1, $word2, $tlds, &$error)
CMailDomainRegistrar::createDomain($user, $password, $domain, $params, &$error)
CMailDomainRegistrar::checkDomain($user, $password, $domain, &$error)
CMailDomainRegistrar::renewDomain($user, $password, $domain, &$error)
CMailDomainRegistrar::updateDns($user, $password, $domain, $params, &$error)
CMailDomainRegistrar::getDomainsList($user, $password, $filter = array(), &$error)
CMailDomainRegistrar::getErrorCode($error)
CMailYandex2::__construct()
CMailYandex2::getImapData()
CMailYandex2::addDomain($token, $domain, &$error)
CMailYandex2::getDomainStatus($token, $domain, &$error)
CMailYandex2::checkDomainStatus($token, $domain, &$error)
CMailYandex2::deleteDomain($token, $domain, &$error)
CMailYandex2::checkUser($token, $domain, $login, &$error)
CMailYandex2::addUser($token, $domain, $login, $password, &$error)
CMailYandex2::getOAuthToken($token, $domain, $login, &$error)
CMailYandex2::passport($country, $oauthToken, $errorUrl)
CMailYandex2::getMailInfo($token, $domain, $login, &$error)
CMailYandex2::deleteUser($token, $domain, $login, &$error)
CMailYandex2::editUser($token, $domain, $login, $data, &$error)
CMailYandex2::getDomainUsers($token, $domain, $per_page = 30, $page = 0, &$error)
CMailYandex2::checkLogo($token, $domain, &$error)
CMailYandex2::setLogo($token, $domain, $file, &$error)
CMailYandex2::setCountry($token, $domain, $country, &$error)
CMailYandex2::post($url, $data)
CMailYandex2::get($url, $data)
CMailYandex2::setError($result, &$error)
CMailRestService::OnRestServiceBuildDescription()
CMailRestService::mailserviceFields($arParams)
CMailRestService::mailserviceList($arParams)
CMailRestService::mailserviceGet($arParams)
CMailRestService::mailserviceAdd($arParams)
CMailRestService::mailserviceUpdate($arParams)
CMailRestService::mailserviceDelete($arParams)
CMailYandex::__construct()
CMailYandex::checkUser($token, $login, &$error)
CMailYandex::registerUserToken($token, $login, $password, &$error)
CMailYandex::userOAuthToken($token, $domain, $login, &$error)
CMailYandex::passport($country, $oauthToken, $errorUrl)
CMailYandex::deleteUser($token, $login, &$error)
CMailYandex::getMailInfo($token, $login, &$error)
CMailYandex::getUserInfo($token, $login, &$error)
CMailYandex::editUser($token, $login, $data, &$error)
CMailYandex::getDomainUsers($token, $per_page = 30, $page = 0, &$error)
CMailYandex::addLogo($token, $domain, $file, &$error)
CMailYandex::query($query, $data)
CMailYandex::setError($xml, &$error)
CMailYandex::setError2($xml, &$error)
CMailDomain::__construct()
CMailDomain::isUserExists($token, $domain, $login, &$error)
CMailDomain::addUser($token, $domain, $login, $password, &$error)
CMailDomain::getRedirectUrl($locale, $token, $domain, $login, $errorUrl, &$error)
CMailDomain::getUnreadMessagesCount($token, $domain, $login, &$error)
CMailDomain::changePassword($token, $domain, $login, $password, &$error)
CMailDomain::getDomainStatus($token, $domain, &$error)
CMailDomain::getDomainUsers($token, $domain, &$error)
CMailDomain::setDomainLogo($token, $domain, $logo, &$error)
CMailDomain::deleteUser($token, $domain, $login, &$error)
CMailDomain::getErrorCode($error)
CMailRegru::__construct()
CMailRegru::checkDomain($user, $password, $domain, &$error)
CMailRegru::suggestDomain($user, $password, $word1, $word2, $tlds, &$error)
CMailRegru::createDomain($user, $password, $domain, $params, &$error)
CMailRegru::checkDomainInfo($user, $password, $domain, &$error)
CMailRegru::renewDomain($user, $password, $domain, $params, &$error)
CMailRegru::updateDns($user, $password, $domain, $params, &$error)
CMailRegru::getDomainsList($user, $password, &$error)
CMailRegru::post($url, $data)
CMailRegru::setError($result, &$error)
CMailImap::__construct()
CMailImap::connect($host, $port, $timeout = 1, $skip_cert = false)
CMailImap::authenticate($login, $password)
CMailImap::getUnseen()
CMailImap::sendCommand($command)
CMailImap::readLine()
CMailImap::readResponse($tag)
CSMTPServer::WriteToLog($txt, $level)
CSMTPServer::Run()
CSMTPServer::Start()
CSMTPServer::ReloadServers()
CSMTPServer::Listen()
CSMTPServer::FindServerSocket($s)
CSMTPServer::FindServerConnection($s)
CSMTPServer::Stop()
CSMTPServer::RemoveHost($i)
CSMTPServerHost::FindConnection($s)
CSMTPServerHost::GetSockets()
CSMTPServerHost::CSMTPServerHost($server, $arFields)
CSMTPServerHost::AddConnection()
CSMTPServerHost::RemoveConnection($id)
CSMTPServerHost::WriteToLog($txt, $level)
CSMTPServerHost::Start()
CSMTPServerHost::Stop($num)
CSMTPServerHost::_Stop()
CSMTPServerHost::CheckTimeout($timeout)
CSMTPConnection::CSMTPConnection($id, $sock, $serv)
CSMTPConnection::WriteToLog($txt, $level)
CSMTPConnection::Receive()
CSMTPConnection::__ParseBuffer()
CSMTPConnection::Send($code, $text = "")
CSMTPConnection::__Send($message)
CSMTPConnection::Disconnect()
CSMTPConnection::CheckRelaying($email)
CSMTPConnection::__ProcessCommand($command, $arg = '')
CSMTPConnection::Authorize($login, $password)
CSMTPConnection::__AuthLoginHandler()
CSMTPConnection::__AuthPlainHandler()
CSMTPConnection::__DataHandler()
CMailDomain2::__construct()
CMailDomain2::getImapData()
CMailDomain2::addDomain($token, $domain, &$error)
CMailDomain2::getDomainStatus($token, $domain, &$error)
CMailDomain2::checkDomainStatus($token, $domain, &$error)
CMailDomain2::deleteDomain($token, $domain, &$error)
CMailDomain2::isUserExists($token, $domain, $login, &$error)
CMailDomain2::addUser($token, $domain, $login, $password, &$error)
CMailDomain2::getRedirectUrl($locale, $token, $domain, $login, $errorUrl, &$error)
CMailDomain2::getUnreadMessagesCount($token, $domain, $login, &$error)
CMailDomain2::changePassword($token, $domain, $login, $password, &$error)
CMailDomain2::getDomainUsers($token, $domain, &$error, $resync = false)
CMailDomain2::setDomainLogo($token, $domain, $logo, $replace, &$error)
CMailDomain2::selLocale($token, $domain, $locale, &$error)
CMailDomain2::deleteUser($token, $domain, $login, &$error)
CMailDomain2::getErrorCode($error)
CMailDomain2::getErrorCode2($error)
CMail::getErrorMessage($code)
CMail::onUserUpdate($arFields)
CMail::onUserDelete($id)
CMail::option($name, $value = null)
CMailError::ResetErrors()
CMailError::SetError($ID, $TITLE="", $DESC="")
CMailError::GetLastError($type=false)
CMailError::GetErrors()
CMailError::GetErrorsText($delim="<br>")
CMailError::ErrCount()
_CMailBoxDBRes::_CMailBoxDBRes($res)
_CMailBoxDBRes::Fetch()
CMailBox::GetList($arOrder=Array(), $arFilter=Array())
CMailBox::GetByID($ID)
CMailBox::CheckMail($mailbox_id = false)
CMailBox::CheckMailAgent($ID)
CMailBox::CheckFields($arFields, $ID=false)
CMailBox::Add($arFields)
CMailBox::Update($ID, $arFields)
CMailBox::Delete($ID)
CMailBox::SMTPReload()
CMailBox::SendCommand($command)
CMailBox::GetResponse($bMultiline = false, $bSkipFirst = true)
CMailBox::GetResponseBody()
CMailBox::GetResponseString()
CMailBox::GetPassword($p)
CMailBox::Check($server, $port, $use_tls, $login, $passw)
CMailBox::Connect($mailbox_id)
CMailBox::_connect($mailbox_id, $arMAILBOX_PARAMS)
CMailBox::GetMessage($mailbox_id, $msgnum, $msguid, $session_id)
CMailBox::DeleteMessage($msgnum)
CMailHeader::ConvertHeader($encoding, $type, $str, $charset)
CMailHeader::DecodeHeader($str, $charset_to, $charset_document)
CMailHeader::Parse($message_header, $charset)
CMailHeader::IsMultipart()
CMailHeader::MultipartType()
CMailHeader::GetBoundary()
CMailHeader::GetHeader($type)
CMailMessage::GetList($arOrder = Array(), $arFilter = Array(), $bCnt = false)
CMailMessage::GetByID($ID)
CMailMessage::GetSpamRating($msgid, $arRow=false)
CMailMessage::ParseHeader($message_header, $charset)
CMailMessage::decodeMessageBody($header, $body, $charset)
CMailMessage::parseMessage($message, $charset)
CMailMessage::AddMessage($mailbox_id, $message, $charset, $params = array())
CMailMessage::Add($arFields)
CMailMessage::Update($ID, $arFields)
CMailMessage::Delete($id)
CMailMessage::MarkAsSpam($ID, $bIsSPAM = true, $arRow = false)
CMailMessage::addAttachment($arFields)
_CMailAttachmentDBRes::__construct($res)
_CMailAttachmentDBRes::fetch()
CMailAttachment::GetList($arOrder=Array(), $arFilter=Array())
CMailAttachment::GetByID($ID)
CMailAttachment::Delete($id)
CMailAttachment::getContents($attachment)
CMailUtil::convertCharset($str, $from, $to)
CMailUtil::uue_decode($str)
CMailUtil::MkOperationFilter($key)
CMailUtil::FilterCreate($fname, $vals, $type, $cOperationType=false, $bSkipEmpty = true)
CMailUtil::FilterCreateEx($fname, $vals, $type, &$bFullJoin, $cOperationType=false, $bSkipEmpty = true)
CMailUtil::ByteXOR($a,$b,$l)
CMailUtil::BinMD5($val)
CMailUtil::Decrypt($str, $key=false)
CMailUtil::Crypt($str, $key=false)
CMailUtil::ExtractAllMailAddresses($emails)
CMailUtil::ExtractMailAddress($email)
CMailUtil::checkImapMailbox($server, $port, $use_tls, $login, $password, &$error)
CMailFilter::GetList($arOrder=Array(), $arFilter=Array(), $bCnt=false)
CMailFilter::GetByID($ID)
CMailFilter::CheckPHP($code, $field_name)
CMailFilter::CheckFields($arFields, $ID=false)
CMailFilter::Add($arFields)
CMailFilter::Update($ID, $arFields)
CMailFilter::Delete($ID)
CMailFilter::Filter($arFields, $event, $FILTER_ID=false, $PARENT_FILTER_ID = false)
CMailFilter::FilterMessage($message_id, $event, $FILTER_ID=false)
CMailFilter::RecalcSpamRating()
CMailFilter::GetSpamRating($message)
CMailFilter::getWords($message, $max_words)
CMailFilter::DoPHPAction($id, $action, &$arMessageFields)
CMailFilter::DeleteFromSpamBase($message, $bIsSPAM = true)
CMailFilter::MarkAsSpam($message, $bIsSPAM = true)
CMailFilter::SpamAction($message, $bIsSPAM, $bDelete = false)
CMailFilter::GetFilterList($id = "")
CMailFilterCondition::GetList($arOrder=Array(), $arFilter=Array())
CMailFilterCondition::GetByID($ID)
CMailFilterCondition::Delete($ID)
CMailFilterCondition::SetConditions($FILTER_ID, $CONDITIONS, $bClearOther = true)
CMailFilterCondition::Add($arFields)
CMailFilterCondition::Update($ID, $arFields)
CMailLog::AddMessage($arFields)
CMailLog::Delete($ID)
CMailLog::GetList($arOrder=Array(), $arFilter=Array())
CMailLog::ConvertRow($arr_log)
_CMailLogDBRes::_CMailLogDBRes($res)
_CMailLogDBRes::Fetch()
CMailbox::CleanUp()
CMailUtil::IsSizeAllowed($size)
MailMessageUidTable::getFilePath()
MailMessageUidTable::getTableName()
MailMessageUidTable::getMap()
MailFilterTable::getFilePath()
MailFilterTable::getTableName()
MailFilterTable::getMap()
MailServicesTable::getFilePath()
MailServicesTable::getTableName()
MailServicesTable::checkFields(Entity\Result $result, $primary, array $data)
MailServicesTable::add(array $data)
MailServicesTable::update($primary, array $data)
MailServicesTable::getIconSrc($serviceName, $iconId = null)
MailServicesTable::delete($primary)
MailServicesTable::getMap()
Message::__construct(array &$message, $type)
Message::getQuoteStartMarker($html = false)
Message::getQuoteEndMarker($html = false)
Message::attachmentsCount()
Message::parse()
Message::parseMessage(array &$message)
Message::parseReply(array &$message)
Message::parseForward(array &$message)
Message::splitHtml(&$html)
Message::splitText(&$text)
Message::scoreFullHead(&$head)
Message::scoreShortHead(&$head)
Message::removeReplyHead(&$text)
Message::removeForwardHead(&$text)
Message::reduceTags(&$text)
Message::reduceHead(&$text)
MailboxTable::getFilePath()
MailboxTable::getTableName()
MailboxTable::getMap()
Helper::syncMailboxAgent($id)
Helper::resyncDomainUsersAgent()
Helper::syncMailbox($id, &$error)
Helper::syncImapMailbox($mailbox, &$error)
Helper::listImapDirs($mailbox, &$error, &$errors = null)
Helper::getImapUnseen($mailbox, $dir = 'inbox', &$error, &$errors = null)
Helper::addImapMessage($id, $data, &$error)
Helper::updateImapMessage($userId, $hash, $data, &$error)
DummyMail::initSettings()
DummyMail::getMailEol()
DummyMail::__toString()
ItemType::resolveByValue($value)
BlacklistTable::getFilePath()
BlacklistTable::getTableName()
BlacklistTable::replace($siteId, $mailboxId, array $list)
BlacklistTable::getMap()
User::create($fields)
User::login()
User::onLoginExternal(&$params)
User::getReplyTo($siteId, $userId, $entityType, $entityId, $entityLink = null, $backurl = null)
User::getForwardTo($siteId, $userId, $entityType)
User::onEmailReceived($to, $message, &$error)
User::getMailUserGroup()
User::getDefaultEmailFrom($serverName = false)
User::getUserData($userList, $nameTemplate)
UserRelationsTable::getFilePath()
UserRelationsTable::getTableName()
UserRelationsTable::getMap()
Imap::__construct($host, $port, $tls, $strict, $login, $password, $encoding)
Imap::__destruct()
Imap::disconnect()
Imap::reset()
Imap::getState()
Imap::connect(&$error)
Imap::starttls(&$error)
Imap::capability(&$error)
Imap::authenticate(&$error)
Imap::select($mailbox, &$error)
Imap::singin(&$error)
Imap::getUnseen($mailbox, &$error)
Imap::listMailboxes($mailbox, &$error)
Imap::listMessages($mailbox, &$uidtoken, &$error)
Imap::addMessage($mailbox, $data, &$error)
Imap::updateMessageFlags($mailbox, $id, $flags, &$error)
Imap::getMessage($mailbox, $id, $section, &$error)
Imap::getUntagged($regex, $unset = false)
Imap::getTag($next = false)
Imap::executeCommand($command, &$error)
Imap::exchange($data, &$error)
Imap::sendData($data)
Imap::readBytes($bytes)
Imap::readLine()
Imap::readResponse()
Imap::prepareString($data)
Imap::escapeQuoted($data)
Imap::unescapeQuoted($data)
Imap::encodeUtf7Imap($data)
Imap::decodeUtf7Imap($data)
Imap::errorMessage($errors, $details = null)
Imap::getErrors()
Imap::decodeError($code)
MailMessageTable::getFilePath()
MailMessageTable::getTableName()
MailMessageTable::getMap()
DomainEmailTable::getFilePath()
DomainEmailTable::getTableName()
DomainEmailTable::getMap()
MailLogTable::getFilePath()
MailLogTable::getTableName()
MailLogTable::getMap()
mail::mail()
mail::InstallDB($arParams = array())
mail::installBitrix24MailService()
mail::UnInstallDB($arParams = array())
mail::InstallEvents()
mail::UnInstallEvents()
mail::InstallFiles($arParams = array())
mail::UnInstallFiles()
mail::DoInstall()
mail::DoUninstall()