|
...
|
...
|
@@ -60,15 +60,13 @@ class SendAutoEmail extends Command |
|
|
|
* @time :2024/12/30 15:43
|
|
|
|
*/
|
|
|
|
public function toQueue($info,$smtpInfo){
|
|
|
|
if($smtpInfo['host'] == 'smtp.163.com'){
|
|
|
|
Config::set('mail.mailers.smtp.port', 465); // 578 端口
|
|
|
|
Config::set('mail.mailers.smtp.encryption', 'ssl'); // 578 通常需要使用 TLS 加密
|
|
|
|
}
|
|
|
|
Config::set('mail.mailers.smtp.host', $smtpInfo['host']);
|
|
|
|
Config::set('mail.mailers.smtp.username', $smtpInfo['email']);
|
|
|
|
Config::set('mail.mailers.smtp.password', $smtpInfo['password']);
|
|
|
|
Config::set('mail.from.address', $smtpInfo['email']);
|
|
|
|
Config::set('mail.from.name', $smtpInfo['from_name']);
|
|
|
|
Config::set('mail.mailers.smtp.port', 465); // 578 端口
|
|
|
|
Config::set('mail.mailers.smtp.encryption', 'ssl'); // 578 通常需要使用 TLS 加密
|
|
|
|
try {
|
|
|
|
$status = AutoEmailLog::STATUS_SUCCESS;
|
|
|
|
Mail::to([$info['email']])->send(new TextMail(['subject' => $info['title'], 'text' => $info['content']]));
|
...
|
...
|
|