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

How can I start sending email?

Article Preview

    Overview

    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.

     

    Which method works best for you?

    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:

    SMTP

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

    API:

    • 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 I implement my chosen method?

    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!

     

    Need Support?

    Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support section of your Mailgun Control Panel, and we'll be with you shortly!