Extension:Mailgun

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Mailgun

Release status:Extension status beta

DescriptionTemplate:Extension#description The extension allows Mediawiki to use Mailgun API to send emails.
Author(s)Template:Extension#username Tony Thomas (01tonythomastalk)
Latest versionTemplate:Extension#version 1.0
Database changesTemplate:Extension#needs-updatephp No
ComposerComposer mailgun/mailgun-php
LicenseTemplate:Extension#license GPL v2.0+
Download
Hooks usedTemplate:Extension#hook
AlternateUserMailerManual:Hooks/AlternateUserMailer

Translate the Mailgun extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The Mailgun extension allows Mediawiki to send emails through Mailgun API service.

Installation[edit]

  • Download and place the file(s) in a directory called Mailgun in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Mailgun' );
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'Mailgun' );, you need to use:

require_once "$IP/extensions/Mailgun/Mailgun.php";

Note Note: You will have to run composer update in extensions/Mailgun/ folder so that composer can pick up the required Mailgun dependency.

Configuration[edit]

You need to have an account on www.mailgun.com and your custom domain verified with it to use Mailgun for sending/receiving mails. Instructions to do the same can be found in the Mailgun documentation.

Security warning: Please do not paste your Mailgun keys directly in your Mailgun/extension.json

Once you have your domain verified, you will get your Mailgun API key to mass send emails. You should configure your API key and domain in LocalSettings.php:

$wgMailgunAPIKey = "key-asdfasdfasdf";
$wgMailgunDomain = "example.in";


Test your settings[edit]

Go to Special:EmailUser and send an email to your own address to verify the working of the mailer. You should be able to see logs of email sessions in your Mailgun logs.

See also[edit]