如何通过 cakehphp app_local 中的变量设置电子邮件

问题描述

在 app_local 中,如何使用 cakephp 4 中的变量设置用户名和密码?我想从表中获取值。 或者,如果我不能使用变量来设置电子邮件,那么还有其他方法吗?

 'EmailTransport' => [
            'default' => [
                'host' => 'ssl://smtp.gmail.com','port' => 465,'username'=>'[email protected]','password'=>'xx',//how can i do this code below with the variables as i cant get data from a table in this file?     
      
    'EmailTransport' => [
            'default' => [
                'host' => 'ssl://smtp.gmail.com','username'=>$username,'password'=>$password,

https://book.cakephp.org/4/en/core-libraries/email.html

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)