You can check your log.
If it show the SwiftMailer was trying to create cache in default /tmp folder :
To solve the issue, change the TMPDIR environment variable in the boot() method of app/Providers/AppServiveProvider.php.
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
/**
* Somehow PHP is not able to write in default /tmp directory and SwiftMailer was failing.
* To overcome this situation, we set the TMPDIR environment variable to a new value.
*/
if (class_exists('Swift_Preferences')) {
\Swift_Preferences::getInstance()->setTempDir(storage_path().'/tmp');
} else {
\Log::warning('Class Swift_Preferences does not exists');
}
}
Please make sure that the new “tmp” folder location is writable by the web server.
6
solved Error throwing while sending an email using laravel [closed]