来自()的Laravel邮件方法
我可以把来自()的Laravel邮件方法,laravel,email,Laravel,Email,我可以把config\mail.php中的ENV变量放在这里吗/* |-------------------------------------------------------------------------- | Global "From" Address |-------------------------------------------------------------------------- | | You may wish for all e-mails sent by
config\mail.php
中的ENV变量放在这里吗/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'noreply@****.com'),
'name' => env('MAIL_FROM_NAME', '****'),
],
因为我试图在我的laravel应用程序中从联系人表单生成消息,我想使用
public function build()
{
return $this->from()->view('email.contact');
}
使用from方法中的动态变量,但我想解决此问题…:/
有没有可能
致以最崇高的敬意我不确定是否理解这个问题,但您可以像这样使用您的“配置电子邮件”:
config('mail.from.address')