I keep trying to use this with mailgun but keep recieving

I keep trying to use this with mailgun but keep recieving this error,

Failed to send test email! - Please check your outgoing email settings and server config to see if selected ports are open. Error details: The following From address failed: postmaster@unitedspectrumsmailer.com : Called Mail() without being connected

Does anyone know how to fix this. I checked, the email i am trying to use is the main email so i know it works with my whmcs. I think i am using the right port 587 and selected tls as mailgun requires.