Search code examples
phplaravel-5environment-variablesproduction-environmentlaravel-forge

Laravel Forge keeps sending mail through Mandrill after removing from environment file


After Mandrill announced it wasn't going to be free anymore, I started looking for an alternative. I found Sendgrid which will suit my purposes.

I updated the Environment file with MAIL_USERNAME, MAIL_PASSWORD, and MAIL_HOST information for Sendgrid on Forge. On my local machine it works and sends through Sendgrid. On my production, it keeps sending through Mandrill even though the environment file has been updated and Mandrill information deleted. How is that? Does Forge use a cache file for the environment that needs to be deleted?


Solution

  • The problem was fixed by restarting the queue worker after the environment file was updated. Confirmed by @retrograde.