当前位置: 首页>>代码示例>>PHP>>正文


PHP OutboundEmail::saveSystem方法代码示例

本文整理汇总了PHP中OutboundEmail::saveSystem方法的典型用法代码示例。如果您正苦于以下问题:PHP OutboundEmail::saveSystem方法的具体用法?PHP OutboundEmail::saveSystem怎么用?PHP OutboundEmail::saveSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OutboundEmail的用法示例。


在下文中一共展示了OutboundEmail::saveSystem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveConfig

 function saveConfig()
 {
     // outbound email settings
     $oe = new OutboundEmail();
     foreach ($_POST as $key => $val) {
         $prefix = $this->get_config_prefix($key);
         if (in_array($prefix[0], $this->config_categories)) {
             if (is_array($val)) {
                 $val = implode(",", $val);
             }
             $this->saveSetting($prefix[0], $prefix[1], $val);
         }
         if (strpos($key, "mail_") !== false) {
             if (in_array($key, $oe->field_defs)) {
                 $oe->{$key} = $val;
             }
         }
     }
     //saving outbound email from here is probably redundant, adding a check to make sure
     //smtpserver name is set.
     if (!empty($oe->mail_smtpserver)) {
         $oe->saveSystem();
     }
     $this->retrieveSettings(false, true);
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:25,代码来源:Administration.php

示例2: Configurator

 function action_Save()
 {
     require_once 'include/OutboundEmail/OutboundEmail.php';
     require_once 'modules/Configurator/Configurator.php';
     $configurator = new Configurator();
     global $sugar_config;
     global $current_user, $mod_strings;
     if (!is_admin($current_user) && !is_admin_for_module($GLOBALS['current_user'], 'Emails') && !is_admin_for_module($GLOBALS['current_user'], 'Campaigns')) {
         sugar_die($mod_strings['LBL_UNAUTH_ACCESS']);
     }
     //Do not allow users to spoof for sendmail if the config flag is not set.
     if (!isset($sugar_config['allow_sendmail_outbound']) || !$sugar_config['allow_sendmail_outbound']) {
         $_REQUEST['mail_sendtype'] = "SMTP";
     }
     // save Outbound settings  #Bug 20033 Ensure data for Outbound email exists before trying to update the system mailer.
     if (isset($_REQUEST['mail_sendtype']) && empty($_REQUEST['campaignConfig'])) {
         $oe = new OutboundEmail();
         $oe->populateFromPost();
         $oe->saveSystem();
     }
     $focus = BeanFactory::getBean('Administration');
     if (isset($_POST['tracking_entities_location_type'])) {
         if ($_POST['tracking_entities_location_type'] != '2') {
             unset($_POST['tracking_entities_location']);
             unset($_POST['tracking_entities_location_type']);
         }
     }
     // cn: handle mail_smtpauth_req checkbox on/off (removing double reference in the form itself
     if (!isset($_POST['mail_smtpauth_req'])) {
         $_POST['mail_smtpauth_req'] = 0;
         if (empty($_POST['campaignConfig'])) {
             $_POST['notify_allow_default_outbound'] = 0;
             // If smtp auth is disabled ensure outbound is disabled.
         }
     }
     $focus->saveConfig();
     // mark user metadata changed so the user preferences get refreshed
     // (user preferences contain email client preference)
     $mm = MetadataManager::getManager();
     $mm->setUserMetadataHasChanged($current_user);
     // save User defaults for emails
     $configurator->config['email_default_delete_attachments'] = isset($_REQUEST['email_default_delete_attachments']) ? true : false;
     ///////////////////////////////////////////////////////////////////////////////
     ////	SECURITY
     $security = array();
     if (isset($_REQUEST['applet'])) {
         $security['applet'] = 'applet';
     }
     if (isset($_REQUEST['base'])) {
         $security['base'] = 'base';
     }
     if (isset($_REQUEST['embed'])) {
         $security['embed'] = 'embed';
     }
     if (isset($_REQUEST['form'])) {
         $security['form'] = 'form';
     }
     if (isset($_REQUEST['frame'])) {
         $security['frame'] = 'frame';
     }
     if (isset($_REQUEST['frameset'])) {
         $security['frameset'] = 'frameset';
     }
     if (isset($_REQUEST['iframe'])) {
         $security['iframe'] = 'iframe';
     }
     if (isset($_REQUEST['import'])) {
         $security['import'] = '\\?import';
     }
     if (isset($_REQUEST['layer'])) {
         $security['layer'] = 'layer';
     }
     if (isset($_REQUEST['link'])) {
         $security['link'] = 'link';
     }
     if (isset($_REQUEST['object'])) {
         $security['object'] = 'object';
     }
     if (isset($_REQUEST['style'])) {
         $security['style'] = 'style';
     }
     if (isset($_REQUEST['xmp'])) {
         $security['xmp'] = 'xmp';
     }
     $security['script'] = 'script';
     $configurator->config['email_xss'] = base64_encode(serialize($security));
     ////	SECURITY
     ///////////////////////////////////////////////////////////////////////////////
     ksort($sugar_config);
     $configurator->handleOverride();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:91,代码来源:controller.php

示例3: Configurator

 function action_Save()
 {
     require_once 'include/OutboundEmail/OutboundEmail.php';
     require_once 'modules/Configurator/Configurator.php';
     $configurator = new Configurator();
     global $sugar_config;
     global $current_user;
     if (!is_admin($current_user) && !is_admin_for_module($GLOBALS['current_user'], 'Emails') && !is_admin_for_module($GLOBALS['current_user'], 'Campaigns')) {
         sugar_die("Unauthorized access to administration.");
     }
     //Do not allow users to spoof for sendmail if the config flag is not set.
     if (!isset($sugar_config['allow_sendmail_outbound']) || !$sugar_config['allow_sendmail_outbound']) {
         $_REQUEST['mail_sendtype'] = "SMTP";
     }
     // save Outbound settings  #Bug 20033 Ensure data for Outbound email exists before trying to update the system mailer.
     if (isset($_REQUEST['mail_sendtype']) && empty($_REQUEST['campaignConfig'])) {
         $oe = new OutboundEmail();
         $oe->populateFromPost();
         $oe->saveSystem();
     }
     $focus = new Administration();
     if (isset($_POST['tracking_entities_location_type'])) {
         if ($_POST['tracking_entities_location_type'] != '2') {
             unset($_POST['tracking_entities_location']);
             unset($_POST['tracking_entities_location_type']);
         }
     }
     // cn: handle mail_smtpauth_req checkbox on/off (removing double reference in the form itself
     if (!isset($_POST['mail_smtpauth_req'])) {
         $_POST['mail_smtpauth_req'] = 0;
         if (empty($_POST['campaignConfig'])) {
             $_POST['notify_allow_default_outbound'] = 0;
             // If smtp auth is disabled ensure outbound is disabled.
         }
     }
     if (!empty($_POST['notify_allow_default_outbound'])) {
         $oe = new OutboundEmail();
         if (!$oe->isAllowUserAccessToSystemDefaultOutbound()) {
             $oe->removeUserOverrideAccounts();
         }
     }
     $focus->saveConfig();
     // save User defaults for emails
     $configurator->config['email_default_delete_attachments'] = isset($_REQUEST['email_default_delete_attachments']) ? true : false;
     ///////////////////////////////////////////////////////////////////////////////
     ////	SECURITY
     $security = array();
     if (isset($_REQUEST['applet'])) {
         $security['applet'] = 'applet';
     }
     if (isset($_REQUEST['base'])) {
         $security['base'] = 'base';
     }
     if (isset($_REQUEST['embed'])) {
         $security['embed'] = 'embed';
     }
     if (isset($_REQUEST['form'])) {
         $security['form'] = 'form';
     }
     if (isset($_REQUEST['frame'])) {
         $security['frame'] = 'frame';
     }
     if (isset($_REQUEST['frameset'])) {
         $security['frameset'] = 'frameset';
     }
     if (isset($_REQUEST['iframe'])) {
         $security['iframe'] = 'iframe';
     }
     if (isset($_REQUEST['import'])) {
         $security['import'] = '\\?import';
     }
     if (isset($_REQUEST['layer'])) {
         $security['layer'] = 'layer';
     }
     if (isset($_REQUEST['link'])) {
         $security['link'] = 'link';
     }
     if (isset($_REQUEST['object'])) {
         $security['object'] = 'object';
     }
     if (isset($_REQUEST['style'])) {
         $security['style'] = 'style';
     }
     if (isset($_REQUEST['xmp'])) {
         $security['xmp'] = 'xmp';
     }
     $security['script'] = 'script';
     $configurator->config['email_xss'] = base64_encode(serialize($security));
     ////	SECURITY
     ///////////////////////////////////////////////////////////////////////////////
     ksort($sugar_config);
     $configurator->handleOverride();
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:93,代码来源:controller.php

示例4: OutboundEmail

 * Contributor(s): ______________________________________..
 ********************************************************************************/
require_once 'include/OutboundEmail/OutboundEmail.php';
global $current_user;
if (!is_admin($current_user) && !is_admin_for_module($GLOBALS['current_user'], 'Emails') && !is_admin_for_module($GLOBALS['current_user'], 'Campaigns')) {
    sugar_die("Unauthorized access to administration.");
}
//Do not allow users to spoof for sendmail if the config flag is not set.
if (!isset($sugar_config['allow_sendmail_outbound']) || !$sugar_config['allow_sendmail_outbound']) {
    $_REQUEST['mail_sendtype'] = "SMTP";
}
// save Outbound settings  #Bug 20033 Ensure data for Outbound email exists before trying to update the system mailer.
if (isset($_REQUEST['mail_sendtype']) && empty($_REQUEST['campaignConfig'])) {
    $oe = new OutboundEmail();
    $oe->populateFromPost();
    $oe->saveSystem();
}
$focus = new Administration();
if (isset($_POST['tracking_entities_location_type'])) {
    if ($_POST['tracking_entities_location_type'] != '2') {
        unset($_POST['tracking_entities_location']);
        unset($_POST['tracking_entities_location_type']);
    }
}
// cn: handle mail_smtpauth_req checkbox on/off (removing double reference in the form itself
if (!isset($_POST['mail_smtpauth_req'])) {
    $_POST['mail_smtpauth_req'] = 0;
    $_POST['notify_allow_default_outbound'] = 0;
    //If smtp auth is disabled ensure outbound is disabled.
}
if (!empty($_POST['notify_allow_default_outbound'])) {
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:31,代码来源:Save.php


注:本文中的OutboundEmail::saveSystem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。