Can';t在Plesk中使用Laravel发送电子邮件
我正在尝试使用plesk中的smtp发送电子邮件,但它不断给我以下错误,即使在搜索相关解决方案后,我也无法修复此错误:Can';t在Plesk中使用Laravel发送电子邮件,laravel,email,plesk,Laravel,Email,Plesk,我正在尝试使用plesk中的smtp发送电子邮件,但它不断给我以下错误,即使在搜索相关解决方案后,我也无法修复此错误: AH01071: Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/xxxx.com/public/../../storage/framework/maintenance.php) is not within t
AH01071: Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/var/www/vhosts/xxxx.com/public/../../storage/framework/maintenance.php) is not within the allowed path(s): (/var/www/vhosts/xxxx.com/:/tmp/) in /var/www/vhosts/xxxx.com/public/index.php on line 19', referer: https://xxxx.com/email/verify
我在public/index.php中有这个
if (file_exists(__DIR__.'/../../storage/framework/maintenance.php')) {
require __DIR__.'/../../storage/framework/maintenance.php';
}
这是我默认的open_basedir路径:
{WEBSPACEROOT}{/}{:}{TMP}{/}
这是我在.env文件中的配置:
MAIL_MAILER=smtp
MAIL_HOST=xxx.com
MAIL_PORT=465
MAIL_USERNAME=xxxx.com
MAIL_PASSWORD=xxxx
MAIL_ENCRYPTION=ssl
MAIL_FROM_ADDRESS='noreply@xxxx.com'
MAIL_FROM_NAME="${APP_NAME}"
如果有人能帮助我,我将非常感激存储文件夹的实际路径是什么 如果它的路径是
/var/www/vhosts/xxxx.com/storage
,则必须将public/index.php
中的路径从\uuuuu DIR\uuuu.'/../storage/framework/maintenance.php'
更改为\uuu DIR\uuuu./../storage/framework maintenance.php'
如果其路径为/var/www/vhosts/storage
,则此路径不在允许的路径内