$iHTMLNewsletterIDCat = 0;
}
$oSelHTMLNewsletterIDCat->setDefault($iHTMLNewsletterIDCat);
// Global HTML newsletter option
$bHTMLNewsletter = false;
if ($iHTMLTemplateIDCat > 0 && $iHTMLNewsletterIDCat > 0 && $oClientLang->getProperty("newsletter", "html_newsletter") == "true") {
    // If necessary idcats are not specified or the option is disabled,
    // then HTML are not used
    $bHTMLNewsletter = true;
}
$oCkbHTMLNewsletter = new cHTMLCheckbox("ckbHTMLNewsletter", "enabled", "", $bHTMLNewsletter);
// Disable HTML options, if user has no rights
if (!$perm->have_perm_area_action($area, "news_html_settings")) {
    $oSelHTMLTemplateIDCat->setDisabled("disabled");
    $oSelHTMLNewsletterIDCat->setDisabled("disabled");
    $oCkbHTMLNewsletter->setDisabled("disabled");
}
// Destination for sending test newsletter
$oSelTestDestination = new cHTMLSelectElement("selTestDestination");
$oSelTestDestination->setStyle("width: 220px;");
$oOption = new cHTMLOptionElement(i18n("My mail address", $plugin_name), 0);
$oSelTestDestination->addOptionElement(0, $oOption);
$oRcpGroups = new RecipientGroupCollection();
$oRcpGroups->setWhere("idclient", (int) $client);
$oRcpGroups->setWhere("idlang", (int) $lang);
$oRcpGroups->setOrder("groupname");
$oRcpGroups->query();
$bTestTargetFound = false;
// Get client and language specific test destination. As lang is client specific, lang is sufficient
$iTestDestination = (int) $oUser->getProperty("newsletter", "test_idnewsgrp_lang" . $lang);
while ($oRcpGroup = $oRcpGroups->next()) {