yii2? ?? ???? ?? ? ?? ?? ?? ??: ?? ?? ?? ??? ??? ? ?? "'useFileTransport' => true" ??? "'useFileTransport' => false"? ???? ????? ?? ??? ?????.
Yii2 ??? ?? ?? ??(??? ????? ?????? ???? ??? ? ??)
yii ??? ?? ??? ?????, ??? ????? ?????? ???? ???? ????. ?????. ?? ?? ??? ??? ????.
??: "yii tutorial"
'components' => [ 'db' => [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=yiidemo', 'username' => 'root', 'password' => 'root', 'charset' => 'utf8', ], 'mailer' => [ 'class' => 'yii\swiftmailer\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' => true, 'transport' => [ 'class' => 'Swift_SmtpTransport', 'host' => 'smtp.qq.com', 'username' => '********@qq.com', 'password' => '********', 'port' => '465', 'encryption' => 'ssl', ], ], ],
???? ??:
public $modelClass = 'common\models\User'; public function actions() { $actions = parent::actions(); // 禁用"create" 操作后可用自己在控制器中寫的方法 unset($actions['update'],$actions['create'],$actions['delete']); //$actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider']; return $actions; } public function actionCreate(){ $request = Yii::$app->request; $params = $request->post(); if($params){ $fromName = $request->getBodyParam('fromName'); $fromBady = $request->getBodyParam('fromBady'); $toName = $request->getBodyParam('toName'); $body = $request->getBodyParam('body'); return $this->send($fromName,$fromBady,$toName,$body); } return false; } /* * Email Send function * @param1 $fromName * @param1 $toName * @param1 $body * $return boo1ean * */ public function send($fromName,$fromBady,$toName,$body = ''){ $mail = \Yii::$app->mailer->compose() ->setFrom([$fromName=>$fromBady]) ->setTo($toName) ->setSubject('郵件發(fā)送配置') ->setTextBody($body) //發(fā)布純文字文本 ->send(); if($mail){ return [ 'name' => [ 'fromName' => $fromName, 'fromBady' => $fromBady, 'toName' => $toName, 'body' => $body, ], 'message' => '發(fā)生到['.$toName.']的郵件成功!', 'code' => 0, 'status' => 200, ]; }else{ return [ 'name' => 'Error', 'message' => '發(fā)生到'.$toName.'的郵件失敗!', 'code' => 0, 'status' => 402, ]; } }
??? ??? ??? ????? ???? ?? ?? ?? ??? ? ????
??? ??? ???
'useFileTransport' => true 改成 'useFileTransport' => false,
??? ??? ??? ????? qq ?? ?????(????? ??->?? ??? ??)
?? ???? ????? ???? ?? ? ????!
? ??? yii2?? ?? ???? ?? ? ?? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Windows 11 ???? Outlook ?? ???? ???? ??? ??? ?? ??? ?? ??? ?? OutlookMail? ???? ?? ??? ??? ??? ??? ????????. ? Outlook ???? ???? ???? ?? ??? ?????? ???? Outlook ?? ???? ?? ??? ?? ?? ??? ?? ? ????. Outlook? ???? ???? ?????. Microsoft Store?? Office ?? ????? ???? ?? ???? ???? ???? ????. ???? mlcfg32.cpl ?? ??? ????. ?????? mlcfg32.cpl ?? ??? ???? ????. ?? ?? ??? ? ??????? ????? ???? ?? ????.

Word? ???? ?? ?? ??? ??? ? ? ???? ???? ?? ? ??? ??? ? ????. ?? ??? ???? ??? ?? ???? ?? ????? ?? ? ?? ??? ?????. Microsoft Word?? ?? ?? ??? ???? ? ???? ?? ??? ???? ???? ???? ? ???? ??? ??? ?? ??? ?? ??? ?? ????. ?? ?? ??? ????? ??? ??? ?????. ??? ?? Word ???? ?? ?? ??? ????? ? ? ????? ? ???? ????? ?? ???? ???? ??????. ?? ??? ???? ??? ?? ??? ? ????. ?? ? ??? ??? ???? ???? ?? ??? ?? ???? ??? ???? ?????. ???

?? ?? ????? Outlook ???? ?? ???? ??? ??? ??????. ??? ??? ?? ? ???? ??? ???? ?????. ? ??? ?? ?? ??? ??? ???? ???? ??? ?? ?? ????. Outlook ?? ???? ???? ??? ??? ??: ???? ?? ??? ?? ??? ???? ?? ????? ?????. ?? ??? Outlook ?? ?? ?? Outlook ?? ?? ?? ???? Outlook? ???/?? ??? ???????. Outlook ??? ??? ?? ??????? ???? ????. ???? ?? ?????? ??? ???? ?????. ? ??? ?? ??? ?? ???? ?? ? ?? ??

??? ?? Microsoft? ?? ?? ??? Windows 11? ??? ??? ?? ??? ?? ???? ????. ??? Microsoft? ???? ???? ?? ???? ???? ?? ???? ???? ????. ??? ????? ?? ??? ???? ??? ??? ???? ??????. Windows 12 ??? ?? MSDT ??? ??? ??? ??? ?, ???? ???? ? ?? ??? ?????. ??? ??? ?? ?? ?? ??? ??? ?? ????? ????. ??? ??? ??? ?? ??? ?? ? ??? ?????. Microsoft? ?? 25314?? ? ??? ? ?? ???? ?? ??????. ?? ?? ? Microsoft? ??? Canary ???? ?? 25314? ????? ??? ???? ????. ? ???? ?? ??? ??? ???? ????.

?? Windows ???? Windows? ?? ?? Gmail ?? ?? ??? ??? ????? ? ? ??? ?? ?? 0x80070490? ?? "??? ??????. ????? ? ? ????"?? ?? ???? ????? ??????. PC . ?? ? ??? ??? ??? ?? ??????? ??? ??? ??? ? ?????. ???? ?? ???????? ???? ??? ???? ?? ???? ????. ?? ??????? ??? ??? ???? ?? ? ??? ??? ? ?? ??? ??? ??? ??? ??, ?? ??????? ?? ?? ??, ??? ?? ?????? ?? ? ????. ?? ?? ??? ??? ?

PHP? ???? ?????? ????. ???? ??? ??? ?? ???? ???. ??: ? ???? ??? ???? ???? ?? ? ?????. ??? ???? ???? ???? ??? ???? ??? ???? ???? ??? ??? ?? ??? ???? ?? ??? ????. ? ??? ???? ?? PHP? ???? ???? ?????? ?? ??? ??? ???? ? ????. ? ????? ?? ?? ??? ?? ?????? ???? ??? ?? ?? ??? ??? ?? PHP? ???? ??? ?????. 1. ???? ??? ?? ??

iOS? Gmail?? ???? ????? ?? ?? ??? ????? ??? ?? ????? ?? ?? ???? ?? iPhone?? Gmail? ???? ??? ????? ?? ?????. iPhone ? iPad?? ?? ?? ???? Gmail ???? ???? ?? ?? ??? ???? ??? ??? ??? ??? ??? ??? ?? ?? ?? ??? ??? ? ????. ? ????? iPhone ? iPad?? Apple Mail ?? ?? Gmail? ???? ???? ?? ????. ? ?? ??? iPhone/iPad?? Gmail ?? ???? ????. ??

PHP ??? ?? ??: ???? ?? ??? ?? ? ??? ?? ?? ???? ???? ???? ?? ??? ???? ???? ?? ??? ?????. ??? ?? ??? ??? ??? ???? ???? ???? ???? ??? ?? ? ?????. ??? ???? ??? ? ???? ??????, ???? ?? ???? ??? ??? ??? ????? ??? ? ? ????? ?? ??? ?? ??? ?? ??????. ??? ?? ??? ???? ?? ??? ??? ???? ???? ? ??? ? ? ????.
