Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

skoobi's avatar
Level 13

Issue with going live and mail

Hi. We're making a site live today and previously we were testing with mailtrap and now for live using mailgun. I have a Digitalocean droplet that we had the test app on, and then today when I want it to go live, i switched everything over to production and checked everything, before pointing the old domain to the new.

The issue I've just hit is that every time I try to send an email it wants to use mailtrap.

Ive updated the .env to reflect the correct details and have run the following. I've checked for other configs and theres no sign of any use of mailtrap anywhere.

 php artisan cache:clear
    php artisan view:clear
    php artisan route:clear
    php artisan clear-compiled
    php artisan config:cache

If i update the env file it reflects on the app, just ignores the mail settings.

All the settings are pointing to mailgun... I just don't get it! Theres no custom config that should interfear with this.

Any ideas?

0 likes
3 replies
tykus's avatar

Try restarting PHP-FPM process on the production server

1 like
skoobi's avatar
Level 13

@tykus Hi. I gave that one a shot as well, but no luck. I've not hit this issue before. I'm getting ::

Symfony\Component\Mailer\Exception\TransportException: Failed to authenticate on SMTP server with username "my_user" using the following authenticators: "CRAM-MD5", "LOGIN", "PLAIN". Authenticator "CRAM-MD5" returned "Expected response code "235" but got code "535", with message "535 5.7.0 The email limit is reached. Please upgrade your plan https://mailtrap.io/billing/plans/testing".

Which would be pretty straight forwards if I was using mailtrap.

skoobi's avatar
skoobi
OP
Best Answer
Level 13

Ok, so I fixed the issue after leaving it for a while. I logged back into the droplet this morning and restarted the server and it worked!!!! The good old IT Tech support saying of "Have you turned it off and back on again?" was true in this case. I don't know whether to be upset or happy at the moment...

Please or to participate in this conversation.