Log in to your Mailgun account.
Proceed to Mailgun Sending -> Domains, select your domain.
Select SMTP and Mailgun will provide you with a username, password and other SMTP settings.
Copy the username and password and use the following SMTP settings.
Email address: The email address that will be used for sending the emails
SMTP Server: smtp.mailgun.org
Port: 587
Use secure connection (TLS): on
Use explicit TLS: on
User name: a username provided by Mailgun
Password: a password provided by Mailgun
Note
You can change the provided SMTP credentials in the Mailgun SMTP interface.