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


PHP OutboundEmail::save方法代码示例

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


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

示例1: testFieldsEncoding

 /**
  * @dataProvider getFields
  * @param string $field
  */
 public function testFieldsEncoding($field)
 {
     // testing insert
     $ob = new OutboundEmail();
     $ob->type = 'test';
     $ob->id = create_guid();
     $ob->new_with_id = true;
     $ob->name = 'Test ' . $ob->id;
     $ob->user_id = '1';
     $ob->{$field} = mt_rand() . " test \\ 'test' " . mt_rand();
     $ob->save();
     // testing update
     $ob->new_with_id = false;
     $ob->name = 'Update ' . $ob->id;
     $ob->user_id = '1';
     $ob->{$field} = mt_rand() . " test2 \\ 'test2' " . mt_rand();
     $ob->save();
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:22,代码来源:Bug59310Test.php

示例2: testUserMailForSystemOverrideRetrieval

 function testUserMailForSystemOverrideRetrieval()
 {
     $ob = new OutboundEmail();
     $ob->name = 'Sugar Test 3';
     $ob->type = 'system-override';
     $ob->user_id = $this->_user->id;
     $ob->mail_sendtype = "SMTP";
     $ob->mail_smtpuser = "Test User";
     $ob->save();
     $this->ob = $ob;
     $retrievedOb = $ob->getUsersMailerForSystemOverride($this->_user->id);
     $this->assertEquals($ob->name, $retrievedOb->name, "Could not retrieve users system override outbound email account");
     $this->assertEquals($ob->type, $retrievedOb->type, "Could not retrieve users system override outbound email account");
     $this->assertEquals($ob->user_id, $retrievedOb->user_id, "Could not retrieve users system override outbound email account");
     $this->assertEquals($ob->mail_sendtype, $retrievedOb->mail_sendtype, "Could not retrieve users system override outbound email account");
     $this->assertEquals("Test User", $retrievedOb->mail_smtpuser, "Could not retrieve users system override outbound email account");
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:17,代码来源:Bug23140Test.php

示例3: isset

                     $ret[$k] = $ie->{$k};
                 }
             }
             $out = $json->encode($ret);
             echo $out;
         }
         //If the user is saving the username/password then we need to update the outbound account.
         $outboundMailUser = isset($_REQUEST['mail_smtpuser']) ? $_REQUEST['mail_smtpuser'] : "";
         $outboundMailPass = isset($_REQUEST['mail_smtppass']) ? $_REQUEST['mail_smtppass'] : "";
         $outboundMailId = isset($_REQUEST['outbound_email']) ? $_REQUEST['outbound_email'] : "";
         if (!empty($outboundMailUser) && !empty($outboundMailPass) && !empty($outboundMailId)) {
             $oe = new OutboundEmail();
             $oe->retrieve($outboundMailId);
             $oe->mail_smtpuser = $outboundMailUser;
             $oe->mail_smtppass = $outboundMailPass;
             $oe->save();
         }
     } else {
         echo "NOOP";
     }
     break;
 case "getIeAccount":
     $GLOBALS['log']->debug("********** EMAIL 2.0 - Asynchronous - at: getIeAccount");
     $ie->retrieve($_REQUEST['ieId']);
     if ($ie->group_id == $current_user->id) {
         $ret = array();
         foreach ($ie->field_defs as $k => $v) {
             if ($k == 'stored_options') {
                 $ie->{$k} = unserialize(base64_decode($ie->{$k}));
                 if (isset($ie->stored_options['from_name'])) {
                     $ie->stored_options['from_name'] = from_html($ie->stored_options['from_name']);
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:31,代码来源:EmailUIAjax.php


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