i'm trying to make a custom email configuration in the service provider, and when trying to send an email i got this error Argument 1 passed to Illuminate\Mail\MailManager::getConfig() must be of the type string, null given (src/Illuminate/Mail/MailManager.php on line 108 )
When posting a question like this, you'll get much better responses if you supply more context, for example:
getConfig()
and the lines that define relevant variables just before that.According to the documentation, it looks like you need to set the following in your project's .env
file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@example.com
MAIL_FROM_NAME="Example app"
Some ideas on the road to fixing it:
php artisan config:clear
telnet mail.example.com 587
and get a HELO
from the SMTP server.Good luck.