루멘을 사용하여 메일을 보내는 방법에 대한 많은 가이드와 질문 및 답변을 읽었습니다. 나는이 많은 제안을 시도했다.루멘에서 메일 보내기
(1/1) FatalThrowableError
Type error: Too few arguments to function Illuminate\Support\Manager::createDriver(), 0 passed in /var/www/monitor/vendor/illuminate/support/Manager.php on line 88 and exactly 1 expected
전체 스택 추적 here :
그러나, 나는 여전히이 오류가 발생합니다.
이
내 컨트롤러 : 나는 주석 처리하고 다음 줄을 추가 한use Illuminate\Support\Facades\Mail;
public function check() {
$response = $this->getResponse();
if ($response) {
if ($this->isAlive($response->state)) {
$user = new \stdClass();
$user->email = '****@gmail.com';
$user->name = 'Albert';
Mail::raw('test', function($mail) use ($user) {
$mail->to($user->email, $user->name)->subject('Test Subject');
});
// I've also tried Mail::send() but no luck
echo 'System is fine';
} else {
echo 'System has issues';
}
} else {
echo 'Error connecting';
}
}
내 bootstrap/app.php
:
.env
파일에 다음있어
$app->withFacades();
$app->register(App\Providers\AppServiceProvider::class);
$app->register(Illuminate\Mail\MailServiceProvider::class);
:
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mygmailpassword
MAIL_ENCRYPTION=tls
내가 누락 된 항목이 있습니까?
어떤 진술을 온라인에 제공하십니까? –