ctms/common/config/main.php
2025-04-10 23:19:13 +08:00

62 lines
2.2 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
# @Author: fm453
# @Date: 1970-01-01T08:00:00+08:00
# @Email: fm453@hiluker.com
# @Last modified by: fm453
# @Last modified time: 2021-09-14T23:27:42+08:00
return [
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'mailer' => [
'class' => 'yii\symfonymailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => false,
'transport' => [
// 'class' => 'Swift_SmtpTransport', //使用的类
'scheme' => 'smtps',
'host' => 'smtp.qq.com', //邮箱服务一地址
'username' => '393213759@qq.com',//邮箱地址,发送的邮箱
'password' => 'oqqkcnstydagbigd', //QQ邮箱授权码
'port' => '465', //服务器端口
'encryption' => 'ssl', //加密方式
],
'messageConfig'=>[
'charset'=>'UTF-8',
'from'=>['393213759@qq.com'=>'admin']
],
],
/**
* 语言包配置归于components下,
* 将"源语言"翻译成"目标语言". 注意"源语言"默认配置为 'sourceLanguage' => 'en-US'
* 使用: \Yii::t('common', 'title'); 将common/messages下的common.php中的title转为对应的中文
*/
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@common/messages',
//'sourceLanguage' => 'en-US',
'fileMap' => [
'common' => 'common.php',
'frontend' => 'frontend.php',
'backend' => 'backend.php',
'errorcode' => 'errorcode.php',
],
],
],
],
],
];