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


PHP CommonFunctions::allowSendmailPathEdit方法代码示例

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


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

示例1: reWriteConf

    /**
     * Write email configuration.
     *
     * @param bool $force - Force write - disregarding config - only use when copying default configuration!
     * @return int
     */
    public function reWriteConf($force = false)
    {
        $sysConf = new sysConf();
        $sendMailPath = $this->originalSendmailPath;
        /*
         * Only override sendmail path if allowed.
         */
        if ($force || CommonFunctions::allowSendmailPathEdit()) {
            $sendMailPath = $this->getSendmailPath();
        }
        $content = '
<?php
	$this->smtpHost = \'' . $this->_safeEscape($this->getSmtpHost()) . '\';
	$this->smtpUser = \'' . $this->_safeEscape($this->getSmtpUser()) . '\';
	$this->smtpPass = \'' . $this->_safeEscape($this->getSmtpPass()) . '\';
	$this->smtpPort = \'' . $this->_safeEscape($this->getSmtpPort()) . '\';

	$this->sendmailPath = \'' . $this->_safeEscape($sendMailPath) . '\';

	$this->mailType = \'' . $this->_safeEscape($this->getMailType()) . '\';
	$this->mailAddress = \'' . $this->_safeEscape($this->getMailAddress()) . '\';
	$this->smtpAuth = \'' . $this->_safeEscape($this->getSmtpAuth()) . '\';
	$this->smtpSecurity = \'' . $this->_safeEscape($this->getSmtpSecurity()) . '\';
?>';
        return file_put_contents($this->configurationFile, $content);
    }
开发者ID:THM068,项目名称:orangehrm,代码行数:32,代码来源:EmailConfiguration.php


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