Основной сайт хуманэмулятор.рф | Демо | Купить | API | Wiki
Web / outlook
remove_message_categories_by_id
remove_message_categories_by_id($folder,$id,$category,$timeout=300); - Удалить категорию у сообщения по idФункция на вход принимает параметры:
После выполнения функции возвращаемое значение будет равно одному из двух :
Пример использования
<?php // Scenario: Remove message categories by ID in Outlook $xhe_host = getenv("RPABOT_HOST_URL"); if (!isset($path)){ // Path to the init.php file for connecting to the XHE API $path = "../../../Templates/init.php"; // Including init.php grants access to all classes and functionality for working with the XHE API require($path); } echo "\n<span>outlook->" . basename (__FILE__) . "</span>\n"; // Step 1. Get a message by partial attachment name match to obtain its ID $folder = "\\\\test@test.ru\\Inbox"; $attachmentName = "png"; $exactMatch = false; echo "Step 1. Get a message by partial attachment name match to obtain its ID: "; $message = WEB::$outlook->get_message_by_attachment_name($folder, $attachmentName, $exactMatch); var_export($message); // Step 2. Get the categories of the message echo "\nStep 2. Get the categories of the message: "; $categories = WEB::$outlook->get_message_categories_by_id($folder, $message->message_id); var_export($categories); // Example 1. Remove a category from the message by ID $categoryName = "category_2"; echo "\n\nExample 1. Remove a category from the message by ID: "; $result = WEB::$outlook->remove_message_categories_by_id($folder, $message->message_id, $categoryName); var_export($result); // Step 3. Get the categories of the message again to verify echo "\nStep 3. Get the categories of the message again to verify: "; $updatedCategories = WEB::$outlook->get_message_categories_by_id($folder, $message->message_id); var_export($updatedCategories); echo "\n"; // Quit WINDOW::$app->quit(); ?>
#region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program:XHEScript { static void Main(string[] args) { // init XHE server = Environment.GetEnvironmentVariable("RPABOT_HOST_URL"); InitXHE(); // начало echo("<hr><font color=blue>outlook->get_message_by_from_via_imap</font><hr>"); // 1 echo("1. Зададим письмо прочитанным по адресу отправителя: "); echo(outlook.get_message_by_from("\\\\bigfozzy@yandex.ru\\Входящие","sales").is_readed+" "); echo(outlook.set_message_readed_by_from("\\\\bigfozzy@yandex.ru\\Входящие","sales",false,true)); // конец echo("\n"); // Quit app.quit(); } }
xhe_host = "127.0.0.1:7010";
echo=require("../../../Templates JS/init.js");
// начало
echo("<hr><font color=blue>mail->get_message_by_from_via_imap</font><hr>");
// 1
echo("1. Зададим письмо прочитанным по адресу отправителя: ");
console.log(outlook.get_message_by_from("\\\\bigfozzy@yandex.ru\\Входящие","sales"));
echo(outlook.set_message_readed_by_from("\\\\bigfozzy@yandex.ru\\Входящие","sales",false,true));
// конец
echo("\n");
// Quit
app.quit();=============================================
outlook Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.