MailGun API

  • What is MailGun

    Mailgun:

    http://www.mailgun.com

    provides a robust set of options for delivering email. When you rent hosting from a rental server company, you usually will have a mail (SMTP) server that comes enabled on your server already.

    Unfortunately, sending email directly from your hosting server is almost sure to either not be delivered, or end up in the recipient's spam folder. This is where 3rd party SMTP providers like MailGun step in. They provide the "reputation" management that ensures your email has the highest delivery rate it can, and by sending your email through their servers they can be sure it is delivered correctly.
  • Why would you use the MailGun module?

    MailGun offers several benefits:

    - If you are running your own server, it could be that email is not working
    - If your users are complaining that they are not receiving email
    - Email you send is ending up in the spam folder
    - You are a developer and want an easy to use, route-able email system designed for developers.

    Mailgun's free plan allows up to 10,000 emails to be sent for free each month.

    Check out the details here: http://www.mailgun.com
  • Configuring the MailGun module

    Configuring the MailGun module requires 3 pieces of information you will find in the MailGun dashboard:

    https://mailgun.com/sessions/new

    The 3 pieces of information you need are:

    Public Validation Key - the Public Validation key is used to validate email addresses in your Jamroom.

    Private API Key - the Private API keys is used to make API calls to MailGun to get delivery and bounced email information.

    MailGun Domain - this MUST be set to the domain name you are running your Jamroom site under. This ensures when the module makes an API call to MailGun it is getting information about the correct domain.
  • screenshot of the location at mailgun to get the public validation key and private API key
  • screenshot of the global config section of the mailgun module
  • Once you have configured the MailGun module, the next step is to make the MailGun API the Active Email System by going to the ACP -> Communications -> Email Support and select "MailGun Email API" as the Active Email System, and save the changes:
  • screenshot of mailgun set to be the systems default email system
  • If you are using Jamroom Hosted, MailGun is already integrated at the server level, which means you do NOT want to set the Active Email System to the MailGun Email API option, but instead be sure it is left at the default of "SMTP Server Configured in Delivery Settings".
  • Email Validation

    An additional feature of the MailGun module is email validation.

    When the module is properly configured it will use the Mailgun API to validate your users' email addresses at a rate of 100 per hour.

    Why is this necessary? If your were to send a newsletter (for example) to all of your (1000's of) users, and many of them were old users whose email addresses were no longer valid, those emails would 'bounce' and the Mailgun systems would then suspect that you are a spamming site and block you.

    So it is necessary to ensure all user email addresses are validated prior to using them. When the MailGUn module detects an invalid address it will be tagged and Jamroom will not send any email to that address any longer.

    This is especially important when user accounts have been imported to Jamroom 'en masse' (for example from a Ning archive). In that situation it is very important that the MailGun module is implemented and given time to validate all imported emails prior to the site going live.
  • Alternative Email Validation (KickBox)

    The Mailgun validation method at a rate of 100 per hour could take several days to complete if you have many 1000's of users.

    An alternative method is to use the Jamroom KickBox module: https://www.jamroom.net/the-jamroom-network/documentation/modules/2929/kickbox-email-validation

    KickBox is a paid service where you can buy the number of validations needed then do all of your users' email checking in one go. This would be useful if you are keen to 'go live' (after a Ning import for example), and cannot wait for the free Mailgun service to complete.
  • MailGun Pricing

    With MailGun, the first 10,000 emails sent out per month are free, after that they have a price per email.

    http://www.mailgun.com/pricing

    Note that if you do NOT enter your credit card information at MailGun your account will NOT be "validated" and you will not be able to reliably send email, so make sure you have entered your Credit Card info at Mailgun. You will not be charged unless you send more than 10,000 emails per month.
  • error: jamroom URL has http://email.MYSITE.com instead of http://mysite.com

    If you find yourself with this situation it will be hard for your users to complete signup because they cant reach your site.

    Instead of getting sent to
    http://your-site.com
    they are sent to
    http://email.your-site.com

    Its because you have some settings turned on in mailgun "Tracking Settings".

    Turn these off so they look like the screenshot and things should go back to normal.
  • settings at mailgun.com related to tracking

Tags