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


PHP OutboundEmail::getUsersMailerForSystemOverride方法代码示例

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


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

示例1: OutboundEmail

     } else {
         if ($newUser) {
             $new_pwd = '3';
         } else {
             $new_pwd = '1';
         }
     }
 }
 ///////////////////////////////////////////////////////////////////////////
 ////	OUTBOUND EMAIL SAVES
 ///////////////////////////////////////////////////////////////////////////
 $sysOutboundAccunt = new OutboundEmail();
 //If a user is not alloweed to use the default system outbound account then they will be
 //saving their own username/password for the system account
 if (!$sysOutboundAccunt->isAllowUserAccessToSystemDefaultOutbound()) {
     $userOverrideOE = $sysOutboundAccunt->getUsersMailerForSystemOverride($focus->id);
     if ($userOverrideOE != null) {
         //User is alloweed to clear username and pass so no need to check for blanks.
         $userOverrideOE->mail_smtpuser = $_REQUEST['mail_smtpuser'];
         $userOverrideOE->mail_smtppass = $_REQUEST['mail_smtppass'];
         $userOverrideOE->save();
     } else {
         //If a user name and password for the mail account is set, create the users override account.
         if (!(empty($_REQUEST['mail_smtpuser']) || empty($_REQUEST['mail_smtppass']))) {
             $sysOutboundAccunt->createUserSystemOverrideAccount($focus->id, $_REQUEST['mail_smtpuser'], $_REQUEST['mail_smtppass']);
         }
     }
 }
 ///////////////////////////////////////////////////////////////////////////
 ////	INBOUND EMAIL SAVES
 if (isset($_REQUEST['server_url']) && !empty($_REQUEST['server_url'])) {
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:Save.php

示例2: getFromAccountsArray

 function getFromAccountsArray($ie)
 {
     global $current_user;
     global $app_strings;
     $ieAccountsFull = $ie->retrieveAllByGroupIdWithGroupAccounts($current_user->id);
     $ieAccountsFrom = array();
     $oe = new OutboundEmail();
     $system = $oe->getSystemMailerSettings();
     $ret = $current_user->getUsersNameAndEmail();
     $ret['name'] = from_html($ret['name']);
     $useMyAccountString = true;
     if (empty($ret['email'])) {
         $systemReturn = $current_user->getSystemDefaultNameAndEmail();
         $ret['email'] = $systemReturn['email'];
         $ret['name'] = from_html($systemReturn['name']);
         $useMyAccountString = false;
     }
     // if
     $myAccountString = '';
     if ($useMyAccountString) {
         $myAccountString = " - {$app_strings['LBL_MY_ACCOUNT']}";
     }
     // if
     //Check to make sure that the user has set the associated inbound email account -> outbound account is active.
     $showFolders = unserialize(base64_decode($current_user->getPreference('showFolders', 'Emails')));
     $sf = new SugarFolder();
     $groupSubs = $sf->getSubscriptions($current_user);
     foreach ($ieAccountsFull as $k => $v) {
         $personalSelected = !empty($showFolders) && in_array($v->id, $showFolders);
         $allowOutboundGroupUsage = $v->get_stored_options('allow_outbound_group_usage', FALSE);
         $groupSelected = in_array($v->groupfolder_id, $groupSubs) && $allowOutboundGroupUsage;
         $selected = $personalSelected || $groupSelected;
         if (!$selected) {
             $GLOBALS['log']->debug("Inbound Email {$v->name}, not selected and will not be available for selection within compose UI.");
             continue;
         }
         $name = $v->get_stored_options('from_name');
         $addr = $v->get_stored_options('from_addr');
         if ($name != null && $addr != null) {
             $name = from_html($name);
             if (!$v->is_personal) {
                 $ieAccountsFrom[] = array("value" => $v->id, "text" => "{$name} ({$addr}) - {$app_strings['LBL_EMAIL_UPPER_CASE_GROUP']}");
             } else {
                 $ieAccountsFrom[] = array("value" => $v->id, "text" => "{$name} ({$addr})");
             }
             // else
         }
         // if
     }
     // foreach
     $userSystemOverride = $oe->getUsersMailerForSystemOverride($current_user->id);
     //Substitute in the users system override if its available.
     if ($userSystemOverride != null) {
         $system = $userSystemOverride;
     }
     if (!empty($system->mail_smtpserver)) {
         $admin = new Administration();
         $admin->retrieveSettings();
         //retrieve all admin settings.
         $ieAccountsFrom[] = array("value" => $system->id, "text" => "{$ret['name']} ({$ret['email']}){$myAccountString}");
     }
     return $ieAccountsFrom;
 }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:63,代码来源:EmailUI.php

示例3: OutboundEmail

    $sugar_smarty->assign("SUBPANEL_TABS", $user_subpanel_tabs ? 'checked' : '');
} else {
    $sugar_smarty->assign("SUBPANEL_TABS", $GLOBALS['sugar_config']['default_subpanel_tabs'] ? 'checked' : '');
}
// Email Options
$sugar_smarty->assign("EMAIL_OPTIONS", $focus->emailAddress->getEmailAddressWidgetDetailView($focus));
$email_link_type = $focus->getPreference('email_link_type');
if (!empty($email_link_type)) {
    $sugar_smarty->assign('EMAIL_LINK_TYPE', $app_list_strings['dom_email_link_type'][$focus->getPreference('email_link_type')]);
}
if ($focus->getPreference('email_link_type') == 'sugar') {
    $sugar_smarty->assign('SHOW_SMTP_SETTINGS', true);
}
//Handle outbound email templates
$oe = new OutboundEmail();
$userOverrideOE = $oe->getUsersMailerForSystemOverride($focus->id);
$mail_smtpuser = "";
$mail_smtpserver = "";
if ($userOverrideOE == null) {
    $systemOE = $oe->getSystemMailerSettings();
    $mail_smtpdisplay = $systemOE->mail_smtpdisplay;
    $mail_smtpserver = $systemOE->mail_smtpserver;
    $mail_smtptype = $systemOE->mail_smtptype;
    if ($oe->isAllowUserAccessToSystemDefaultOutbound()) {
        $mail_smtpuser = $systemOE->mail_smtpuser;
    }
} else {
    $mail_smtpdisplay = $userOverrideOE->mail_smtpdisplay;
    $mail_smtpuser = $userOverrideOE->mail_smtpuser;
    $mail_smtpserver = $userOverrideOE->mail_smtpserver;
    $mail_smtptype = $userOverrideOE->mail_smtptype;
开发者ID:nartnik,项目名称:sugarcrm_test,代码行数:31,代码来源:DetailView.php

示例4: testDuplicateSystemAccountForUser

 function testDuplicateSystemAccountForUser()
 {
     $oe = new OutboundEmail();
     $userOverideAccont = $oe->createUserSystemOverrideAccount($this->_user->id, "TEST USER NAME", "TEST PASSWORD");
     $this->userOverideAccont = $userOverideAccont;
     $retrievedOb = $oe->getUsersMailerForSystemOverride($this->_user->id);
     $this->assertEquals("TEST USER NAME", $retrievedOb->mail_smtpuser, "Could not duplicate systems outbound account for user");
     $this->assertEquals($this->_user->id, $retrievedOb->user_id, "Could not duplicate systems outbound account for user");
     $this->assertEquals("TEST PASSWORD", $retrievedOb->mail_smtppass, "Could not duplicate systems outbound account for user");
     $this->assertEquals('system-override', $userOverideAccont->type, "Could not duplicate systems outbound account for user");
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:11,代码来源:Bug23140Test.php

示例5: array

         if ($k == "") {
             $sigs[$k] = $app_strings['LBL_NONE'];
         } else {
             if (is_array($v) && isset($v['name'])) {
                 $sigs[$k] = $v['name'];
             } else {
                 $sigs[$k] = $v;
             }
         }
     }
     $out['signatures'] = $sigs;
     $out['fromAccounts'] = $email->et->getFromAccountsArray($ie);
     $out['errorArray'] = array();
     $oe = new OutboundEmail();
     if ($oe->doesUserOverrideAccountRequireCredentials($current_user->id)) {
         $overideAccount = $oe->getUsersMailerForSystemOverride($current_user->id);
         //If the user override account has not been created yet, create it for the user.
         if ($overideAccount == null) {
             $overideAccount = $oe->createUserSystemOverrideAccount($current_user->id);
         }
         $out['errorArray'] = array($overideAccount->id => $app_strings['LBL_EMAIL_WARNING_MISSING_USER_CREDS']);
     }
     $ret = $json->encode($out);
     echo $ret;
     break;
 case "getSignature":
     $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: getSignature");
     if (isset($_REQUEST['id'])) {
         $signature = $current_user->getSignature($_REQUEST['id']);
         $signature['signature_html'] = from_html($signature['signature_html']);
         $out = $json->encode($signature);
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:31,代码来源:EmailUIAjax.php


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