We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

How Do I Start Sending Email?

Which Method Works Best for You?

To get your sending off the ground, after you've got your domain added and fully configured, you need to decide which of our two methods you're going to use; SMTP or API. You'll be using one of the two methods to send via our platform using a sending application of your choice. Note: Since Mailgun does not host mailboxes, our service does not use the POP or IMAP protocols.


Both methods work very well - it's all about what your use case needs happen to be, as well as your personal preferences. At a glance:


  • Flexible with existing applications
  • Less technical/coding knowledge not necessary
  • Open protocol


  • Faster (three times faster!)
  • More technical/coding knowledge necessary; 
  • No need to craft a MIME (message body) - we assemble it on our side!
  • Better for large scale sending; more volume, to more recipients, with less effort


How Do We Put This Into Practice?

Here's a snapshot of sending via Mailgun with our API:

  • Have your API key ready, found in your Mailgun control panel. Need help? Look here
  • Your API base url will be 
    • US region: https://api.mailgun.net/v3/YOUR_DOMAIN/
    • EU region: https://api.eu.mailgun.net/v3/YOUR_DOMAIN/
  • Check out our libraries for easy integration with Python, Ruby, Java, C# and PHP 

Here's sample code for sending an email with cURL:

curl -s --user 'api:key-3ax6xnjp29jd6fds4gc373sgvjxteol0' \ 
https://api.mailgun.net/v3/samples.mailgun.org/messages \
 -F from='Excited User <excited@samples.mailgun.org>' \
 -F to='devs@mailgun.net' \
-F subject='Hello' \ -F text='Testing some Mailgun awesomeness!'

This is of course a quick summary view of the process start to sending; for more information, check out our Quickstart Guide to help get you sending right away!

Got Questions?

Sinch Mailgun has answers! If you have any concerns or questions, please send us a Support ticket using the Support page within your Mailgun Control Panel.  Our Support Team will be happy to assist!