I to have ran into this issue. I added the correct data into the wp-config.php file and emptied out the settings in the plugin settings area. Did testing and it failed.
Is this a single site or a multisite environment?
I can only speak for mine, but it is a single not wpmu site.
It’s a single site environment.
After some more tests I found when I set the Mailgun settings via wp-config.php
, the settings UI of Mailgun are still all empty and didn’t reflect to the options in wp-config.php
. And there’s the banner that is still showing that I need to set up Mailgun in order to work.
However when I enter some “dummy” strings like a fake API key in the web UI and save it. everything seems to be working. The banner is gone, the email test is working. The plugin actually ignores all the fake settings I set from the web UI and just reads what I set in the wp-config.php
.
You may say this is just a small UI glitch because after you enter some “dummy” settings everything could work. However I manage many instances of WordPress in different datacenter location using WP-CLI, so all the settings I set to wp-config.php
are done remotely from WP-CLI. If this bug exists I have to login to every sites I have and enter some fake settings to make the setup banner disappear.
Good find as to what the issue is @sparanoid
Multisite here. WP 4.9.9 and Mailgun plugin 1.6.1. Can’t go into every single site and enter bogus settings. Any fix?
Some updates for latest Mailgun for WordPress v1.7.1:
With this version it seems the Mailgun options page will be set to hidden totally from dashboard if you define your credentials in wp-config.php
. This somehow fix the original issue I mentioned above, but introduced a new issue. There’s no way to view the credentials or send test emails in dashboard. I still hope this issue could be fixed in a different way, just show the credentials and make them uneditable, or at least there should be a test connection button.