Integrate Magento 2.X with Mailgun

Appy Pie Connect allows you to automate multiple workflows between Magento 2.X and Mailgun

  • No code
  • No Credit Card
  • Lightning Fast Setup
20 Million man hours saved

Award Winning App Integration Platform

About Magento 2.X

Magento 2.x is an open-source e-commerce platform written in PHP. It is one of the most popular e-feature-rich platforms that you to manage your eCommerce store without any hassle.

About Mailgun

Mailgun is the email automation engine trusted by over millions of websites and application developers for sending, receiving and tracking emails.

Mailgun Integrations
Mailgun Alternatives

Looking for the Mailgun Alternatives? Here is the list of top Mailgun Alternatives

  • MailerLite Integration MailerLite
  • MailChimp Integration MailChimp

Best Magento 2.X and Mailgun Integrations

  • Magento 2.X Integration Magento 2.X Integration

    Mailgun + Magento 2.X

    Create Sales Order Comment to Magento 2.X from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Magento 2.X Integration New Unsubscriber
     
    Then do this...
    Magento 2.X Integration Create Sales Order Comment
  • Magento 2.X Integration Magento 2.X Integration

    Mailgun + Magento 2.X

    Create Sales Order Invoice to Magento 2.X from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Magento 2.X Integration New Unsubscriber
     
    Then do this...
    Magento 2.X Integration Create Sales Order Invoice
  • Magento 2.X Integration Magento 2.X Integration

    Mailgun + Magento 2.X

    Create Category to Magento 2.X from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Magento 2.X Integration New Unsubscriber
     
    Then do this...
    Magento 2.X Integration Create Category
  • Magento 2.X Integration Magento 2.X Integration

    Mailgun + Magento 2.X

    Create Customer to Magento 2.X from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Magento 2.X Integration New Unsubscriber
     
    Then do this...
    Magento 2.X Integration Create Customer
  • Magento 2.X Integration Magento 2.X Integration

    Mailgun + Magento 2.X

    Create Product to Magento 2.X from New Unsubscriber in Mailgun Read More...
    Close
    When this happens...
    Magento 2.X Integration New Unsubscriber
     
    Then do this...
    Magento 2.X Integration Create Product
  • Magento 2.X Integration {{item.actionAppName}} Integration

    Magento 2.X + {{item.actionAppName}}

    {{item.message}} Read More...
    Close
    When this happens...
    {{item.triggerAppName}} Integration {{item.triggerTitle}}
     
    Then do this...
    {{item.actionAppName}} Integration {{item.actionTitle}}
Connect Magento 2.X + Mailgun in easier way

It's easy to connect Magento 2.X + Mailgun without coding knowledge. Start creating your own business flow.

    Triggers
  • New Customer

    Triggers when Magento gets a new customer.

  • New Order

    Triggers when a new order is created (with line item support).

  • New Product

    Triggers when a new product is created in Magento.

  • New Sales Order Credit Memo

    Triggers when a new sales order creditmemo is created.

  • New Sales Order Invoice

    Triggers when a new sales order invoice is created (with line item support).

  • New Sales Order Shipment

    Triggers when Magento gets a new sales order shipment (with line item support).

  • Updated Customer

    Triggers when Magento gets a updated customer.

  • New Subscriber

    Triggers whenever a new subscriber is added.

  • New Unsubscriber

    Triggers when a current subscriber unsubscribed.

    Actions
  • Create Category

    Create a new category

  • Create Customer

    Create a new customer

  • Create Order

    Create a new catalog order

  • Create Product

    Create a new catalog product

  • Create Sales Order Comment

    Create a new sales order comment

  • Create Sales Order Invoice

    Create a new sales order invoice

  • Create/Update Product

    Create/update a new catalog product

  • Update Product

    Update a catalog product

Compliance Certifications and Memberships

Highly rated by thousands of customers all over the world

We’ve been featured on

featuredon
Page reviewed by: Abhinav Girdhar  | Last Updated on July 01, 2022 5:55 am

How Magento 2.X & Mailgun Integrations Work

  1. Step 1: Choose Magento 2.X as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Mailgun as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from Magento 2.X to Mailgun.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of Magento 2.X and Mailgun

Email marketing is one of the most popular, easy and cost-effective online marketing techniques. It has been proved by several statistic companies that email marketing can bring a significant amount of traffic to your website.Mailgun is a service which allows you to send and receive emails through your own domain name. Magento 2.X, an open-source e-commerce platform, offers advanced features for running an online store. This project aims at integrating Magento 2.X and Mailgun services in order to get a powerful email marketing system which will attract more customers to your online store.Magento 2.X is a new version of Magento, an e-commerce platform. Magento is used by more than 270,000 merchants to power more than 240,000 online stores and process more than 1 billion orders each year.Mailgun is a service which allows you to send and receive emails through your own domain name. You can use Mailgun when you need to send transactional messages and marketing emails, including newsletters, notifications, and password resets.

This part will discuss how to integrate Mailgun into Magento 2.X.• First, you need to install Mailgun PHP library in your Magento 2.X application. To do this, go to the Magento Marketplace and search for "mailgun". Then, choose "Mailgun for PHP" component and install it into your Magento 2.X application.• Second, create a new module with the fplowing command:php bin/magento module:create Mailgun_Integration_Module• Third, create a new class with the fplowing command:php bin/magento app:create mailgun_integration• Fourth, add the fplowing code into your newly created file "mailgun_integration/app/code/local/Mailgun/Integration/etc/config.xml":<?xml version="1.0"?><config>

<static>

<servers>

<server>mailgun-smtp-in.mailgun.org</server>

</servers>

</static>

<routers>

<router id="mailgun">

<param name="__construct">MG("mailgun","{domain}", "{public_key}")</param>

</router>

</routers>

</config>

  • Fifth, you need to take two kinds of information from Mailgun website:

(1. Your public key;(2. Domain name (for example, your domain name is "example.com", so you should get "example.com" as your domain name);• Sixth, modify your "Mailgun/Integration/etc/config.xml" file by adding it after your domain name like this:<?xml version="1.0"?><config>

<static>

<servers>

<server>mailgun-smtp-in.mailgun.org</server>

</servers>

</static>

<routers>

<router id="mailgun">

<param name="__construct">MG("mailgun","{domain}", "{public_key}", "{domain}")</param>

</router>

</routers>

</config>

  • Seventh, configure your domain to work with Mailgun like this:

Go to Mailgun website (http://www.mailgun.com/signup/. and register for an account;Go to your "Domain Settings" page (https://api.mailgun.net/v3/YOURDOMAINNAMEHERE.mailgun.org/settings);Enter CNAME or MX records for your domain name;Select "Authorized IP Ranges" and add your IP address;Click "Save Changes".• Eighth, configure your DNS settings and test everything on the Mailgun website and check that you are able to send and receive emails through your domain name. http://www.mailgun.com/kb/getting-started#test-your-dns-settings• Ninth, if everything works fine, you can use Magento's native extension configuration top (System > Magento Connect > Magento Connect Manager. to install our custom extension into your Magento 2.X application. http://www.mage2pro.com/knowledge-base/how-to-install-custom-extensions-into-magento-2x-with-magento-connect/

— what have we learned? Now our Magento 2.X can work with Mailgun to send and receive emails through its own domain name without any further configuration! We have just finished our integration of Magento 2.X and Mailgun successfully! So what are you waiting for? Start sending emails right now!

The process to integrate Magento 2.X and Mailgun may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.