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


PHP Zend_Mail::setDefaultReplyTo方法代码示例

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


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

示例1: _initMail

 protected function _initMail()
 {
     Zend_Mail::setDefaultFrom('xlr8ufitness@live.com.au', 'XLR8U Fitness');
     Zend_Mail::setDefaultReplyTo('xlr8ufitness@live.com.au', 'XLR8U Fitness');
     $transport = new Zend_Mail_Transport_Sendmail();
     Zend_Mail::setDefaultTransport($transport);
 }
开发者ID:robjacoby,项目名称:xlr8u,代码行数:7,代码来源:Bootstrap.php

示例2: __construct

 public function __construct()
 {
     $tr = new Zend_Mail_Transport_Smtp(Zend_Registry::get('Setting')->EMAIL_SMTP_HOST, array('auth' => 'login', 'username' => Zend_Registry::get('Setting')->EMAIL_SMTP_USER, 'password' => Zend_Registry::get('Setting')->EMAIL_SMTP_PASS, 'port' => Zend_Registry::get('Setting')->EMAIL_SMTP_PORT));
     if (Zend_Registry::get('Setting')->EMAIL_SMTP_SSL) {
         array('ssl' => Zend_Registry::get('Setting')->EMAIL_SMTP_SSL);
     }
     Zend_Mail::setDefaultTransport($tr);
     Zend_Mail::setDefaultFrom(Zend_Registry::get('Setting')->webmaster_email, Zend_Registry::get('Setting')->webmaster_name);
     Zend_Mail::setDefaultReplyTo(Zend_Registry::get('Setting')->webmaster_email, Zend_Registry::get('Setting')->webmaster_name);
 }
开发者ID:hoaitn,项目名称:base-zend,代码行数:10,代码来源:Email.php

示例3: _getFallBackTransport

 /**
  * Get the fallback Transport, used if the plugin is disabled
  * @return Zend_Mail_Transport_Sendmail
  */
 protected function _getFallBackTransport($parameters = null)
 {
     Zend_Mail::setDefaultFrom($this->settings->siteEmail);
     Zend_Mail::setDefaultReplyTo($this->settings->siteEmail, $this->seoOption->siteName);
     return new Zend_Mail_Transport_Sendmail($parameters);
 }
开发者ID:sandeepdwarkapuria,项目名称:dotkernel,代码行数:10,代码来源:Email.php

示例4: init

 /**
  * Initializes the mailer with the settings form Settings -> System -> Email Settings
  *
  * @return void
  */
 public function init($type = "email")
 {
     $systemConfig = \Pimcore\Config::getSystemConfig()->toArray();
     $emailSettings =& $systemConfig[$type];
     if ($emailSettings['sender']['email']) {
         \Zend_Mail::setDefaultFrom($emailSettings['sender']['email'], $emailSettings['sender']['name']);
     }
     if ($emailSettings['return']['email']) {
         \Zend_Mail::setDefaultReplyTo($emailSettings['return']['email'], $emailSettings['return']['name']);
     }
     if ($emailSettings['method'] == "smtp") {
         $config = array();
         if ($emailSettings['smtp']['name']) {
             $config['name'] = $emailSettings['smtp']['name'];
         }
         if ($emailSettings['smtp']['ssl']) {
             $config['ssl'] = $emailSettings['smtp']['ssl'];
         }
         if ($emailSettings['smtp']['port']) {
             $config['port'] = $emailSettings['smtp']['port'];
         }
         if ($emailSettings['smtp']['auth']['method']) {
             $config['auth'] = $emailSettings['smtp']['auth']['method'];
             $config['username'] = $emailSettings['smtp']['auth']['username'];
             $config['password'] = $emailSettings['smtp']['auth']['password'];
         }
         $transport = new \Zend_Mail_Transport_Smtp($emailSettings['smtp']['host'], $config);
         \Zend_Mail::setDefaultTransport($transport);
     }
     //setting debug email addresses
     if ($type == "email" && empty(self::$debugEmailAddresses)) {
         if ($emailSettings['debug']['emailaddresses']) {
             foreach (explode(',', $emailSettings['debug']['emailaddresses']) as $emailAddress) {
                 self::$debugEmailAddresses[] = $emailAddress;
             }
         }
     }
     $this->placeholderObject = new \Pimcore\Placeholder();
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:44,代码来源:Mail.php

示例5: testMethodSendUsesDefaults

 public function testMethodSendUsesDefaults()
 {
     Zend_Mail::setDefaultFrom('john@example.com', 'John Doe');
     Zend_Mail::setDefaultReplyTo('foo@example.com', 'Foo Bar');
     $mail = new Zend_Mail();
     $mail->setBodyText('Defaults Test');
     $mock = new Zend_Mail_Transport_Mock();
     $mail->send($mock);
     $headers = $mock->headers;
     $this->assertTrue($mock->called);
     $this->assertEquals($mock->from, 'john@example.com');
     $this->assertEquals($headers['From'][0], 'John Doe <john@example.com>');
     $this->assertEquals($headers['Reply-To'][0], 'Foo Bar <foo@example.com>');
 }
开发者ID:jsnshrmn,项目名称:Suma,代码行数:14,代码来源:MailTest.php

示例6: initMail

 protected function initMail()
 {
     if (isset($this['mail.from.email'])) {
         \Zend_Mail::setDefaultFrom($this['mail.from.email'], $this['mail.from.name']);
     }
     if (isset($this['mail.replyto.email'])) {
         \Zend_Mail::setDefaultReplyTo($this['mail.replyto.email'], $this['mail.replyto.name']);
     }
     // Create transport
     switch (strtolower($this['mail.method'])) {
         case 'smtp':
             $transport = new \Zend_Mail_Transport_Smtp($this['mail.host'], (array) $this['mail.options']);
             \Zend_Mail::setDefaultTransport($transport);
             break;
         case 'sendmail':
         default:
             $transport = new \Zend_Mail_Transport_Sendmail((array) $this['mail.options']);
             \Zend_Mail::setDefaultTransport($transport);
             break;
     }
 }
开发者ID:bombayworks,项目名称:currycms,代码行数:21,代码来源:App.php

示例7: getMail

 /**
  * @static
  * @param  $sender
  * @param  $recipients
  * @param  $subject
  * @return Zend_Mail
  */
 public static function getMail($recipients = null, $subject = null)
 {
     $values = Pimcore_Config::getSystemConfig();
     $valueArray = $values->toArray();
     $emailSettings = $valueArray["email"];
     $mail = new Zend_Mail("UTF-8");
     if (!empty($emailSettings['sender']['email'])) {
         $mail->setDefaultFrom($emailSettings['sender']['email'], $emailSettings['sender']['name']);
     }
     if (!empty($emailSettings['return']['email'])) {
         $mail->setDefaultReplyTo($emailSettings['return']['email'], $emailSettings['return']['name']);
     }
     if ($emailSettings['method'] == "smtp") {
         $config = array();
         if (!empty($emailSettings['smtp']['name'])) {
             $config['name'] = $emailSettings['smtp']['name'];
         }
         if (!empty($emailSettings['smtp']['ssl'])) {
             $config['ssl'] = $emailSettings['smtp']['ssl'];
         }
         if (!empty($emailSettings['smtp']['port'])) {
             $config['port'] = $emailSettings['smtp']['port'];
         }
         if (!empty($emailSettings['smtp']['auth']['method'])) {
             $config['auth'] = $emailSettings['smtp']['auth']['method'];
             $config['username'] = $emailSettings['smtp']['auth']['username'];
             $config['password'] = $emailSettings['smtp']['auth']['password'];
         }
         $transport = new Zend_Mail_Transport_Smtp($emailSettings['smtp']['host'], $config);
         //Logger::log($transport);
         //Logger::log($config);
         $mail->setDefaultTransport($transport);
     }
     if ($recipients) {
         if (is_string($recipients)) {
             $mail->addTo($recipients);
         } else {
             if (is_array($recipients)) {
                 foreach ($recipients as $recipient) {
                     $mail->addTo($recipient);
                 }
             }
         }
     }
     if ($subject) {
         $mail->setSubject($subject);
     }
     return $mail;
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:56,代码来源:Tool.php

示例8:

// Create application, bootstrap, and run
$application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
// the database adapter for the session
Zend_Registry::set("dbAdapter", $application->getBootstrap()->getPluginResource('db')->getDbAdapter());
$cache = $application->getBootstrap()->getPluginResource('cachemanager')->getCacheManager()->getCache('database');
Zend_Registry::set('cache', $cache);
# Zend Translate instance
$translate = new Zend_Translate(array('adapter' => 'ini', 'content' => APPLICATION_PATH . '/configs/en.language.ini'));
# $translate->setCache($cache); // the caching of the translate seems to cause an error, do not know why
Zend_Registry::set('translate', $translate);
# Zend Logger instance
Zend_Registry::set("logger", $application->getBootstrap()->getPluginResource('log')->getLog());
# currency object
$currency = new Zend_Currency('en_US');
$currency->setCache($cache);
Zend_Registry::set('currency', $currency);
# Zend Mail instance
// create a new instance
$mailer = new Zend_Mail('utf8');
// set the default transport configured in application.ini
$mailer->setDefaultTransport($application->getBootstrap()->getPluginResource('mail')->getMail());
// set the default to and from addresses
$mail_config = new Zend_Config($application->getBootstrap()->getPluginResource('mail')->getOptions());
$mailer->setDefaultFrom($mail_config->defaultFrom->email, $mail_config->defaultFrom->name);
$mailer->setDefaultReplyTo($mail_config->defaultReplyTo->email, $mail_config->defaultReplyTo->name);
// add the mail instance to the registry
Zend_Registry::set("mail", $mailer);
// add caching for Zend_Table which is used for Session information
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
# run the default page
$application->bootstrap()->run();
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:31,代码来源:index.php


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