OK, I have done a little more testing.
I went back and set up SMTP to our Mailgun account to see if we could get things working. And didn’t work. Just got an error and a link to docs to trouble shot the error.
So I removed FluentSMTP and loaded up the old true and reliable ‘Post SMTP’ plugin to see if I got the same issues.
When I when through ‘Post SMTP’ set up wizard, I told ‘Post SMTP’ I was going to use regular ole’ SMTP connection. And I provided the Mailgun SMTP Server name smtp.mailgun.org. It ran the tests and listed ALL available PORTs to use to connect Mailgun. And only Port 25 and 587 was available. I used Port 465 when I set up FluentSMTP. And received the error and not any other reason or possible solution.
So continuing setting up SMTP to Mailgun using SMTP. And sent a Test email, the test email went through without issue. So much for my .htaccess theory being the problem.
Now I proved I can send, and confirmed which send ports are available.
Now I set up Post SMTP to connect with Mailgun API. After set up, I sent a test email in Post SMTP without issue.
I have NO idea now as to why FluentSMTP would not connect up to Mailgun using the API.
Cool thing with Post SMTP, it does have a Diagnostic Test, not going to help with FluentSMTP, but it does provide very good information when needing to troubleshoot. FluentSMTP should consider same or similar.
Another item Post SMTP has, valuable tool, is the Outgoing Mail server Hostname, Connectivity Test. I can place in the Mailgun API address or SMTP port info and provide connectivity report.
It provides for current Status and Service Available. And it is saying connection is available and open for Mailgun API connection and Ports 25 and 587 for SMTP.
I will remove Post SMTP reload FluentSMTP and see what happens since now I know port 465 is closed on this server.
3rd Follow Up
OK, deleted Post SMTP (which worked fine with both Mailgun SMTP, and Mailgun API).
Then loaded FluentSMTP back and I did discover a mistake (since the plugin remembered my settings when I loaded it back) I used PORT 486, that is wrong, it should be PORT 465, but regardless 465 isn’t available on this server.
So changed to 587 and changed to TLS from SSL (although Mailgun says 25, 465 and 587 use SSL and TLS). Saved settings went back to test.
This time the Test email using Mailgun SMTP Worked without issue. Yeah!
Now going back to test Mailgun API again.
CORRECTION ON MY PART – When I first set up FluentSMTP I the API Key I obtained was from SENDING > Domain Settings > Sending API Keys > Add sending key
That didn’t work in FluentSMTP but DID work in Post SMTP.
So, I reviewed the FluentSMTP docs (its a guy thing right? Do not read instructions) and instead I am needing to use the PRIVATE Key obtained at Settings > API Keys and selecting the Private API Key. When I did that, and sent a Test Email sent successfully.
Not sure of the differnce of the two keys, but it does make a difference.
So, all working.
SUGGESTION – It would be REALLY NICE to add to FluentSMTP a pretest of all standard ports, 25, 465 and 587 to confirm which ones are OPEN (on the respective server), that is a very nice tool on Post SMTP and saves a lot of headache in setting up.
Hope all this helps someone.
-
This reply was modified 4 years, 10 months ago by
KartHost.
Hello @karthost
Thank you so much for the experiments. Really appreciate. So many good suggestions in a single thread. Love it. I am forwarding this to our dev team and We will see what we can improve based on your suggestions.
For now, I am closing this issue.
Thanks again 🙂