Kohana小技巧 » 荒野无灯weblog

Keep It Simple, Stupid.

荒野无灯weblog

Kohana小技巧

使用smarty:见先前的文章
使用zend framework类库:见先前的文章
配置:
mail.php丢到应用的config目录下面,

defined ( 'SYSPATH' ) or die ( 'No direct access allowed.' );

return array (
        'smtp_gmail' => 
        array ('from_name' => '荒野无灯',
//...
),
'smtp_qq'=>array(
//...
),
);

加载配置:

    $smtp_conf = Kohana::$config->load('mail.smtp');
        $from = $smtp_conf['email_from'];
        $from_name = $smtp_conf['from_name'];

Tagged in :

All Comments (0)
Gravatar image
No Comments