diff --git a/mailgun.module b/mailgun.module
index a5bb037..edd9462 100644
--- a/mailgun.module
+++ b/mailgun.module
@@ -98,14 +98,25 @@ function mailgun_mail($key, &$message, $params) {
 function mailgun_libraries_info() {
   $libraries['mailgun'] = array(
     'name' => 'Mailgun PHP library',
-    'vendor url' => 'https://documentation.mailgun.com/wrappers.html#php',
-    'download url' => 'https://github.com/mailgun/mailgun-php/archive/v1.7.2.zip',
+    'vendor url' => 'https://documentation.mailgun.com/libraries.html',
+
+    // Recommendation:
+    //  cd sites/all/libraries/mailgun
+    //  composer require --update-no-dev mailgun/mailgun-php
+    'download url' => 'https://github.com/mailgun/mailgun-php/archive/v2.3.4.zip',
+
+    // Path to the 'autoload.php' created by Composer.
     'path' => 'vendor',
+    // Which SDK version of the mailgun library does this module support?
+    'versions' => ['1.7' => []],
+
+    // Detect the library and which (SDK) version it is.
     'version arguments' => array(
-      'file' => 'src/Mailgun/Constants/Constants.php',
-      // const SDK_VERSION = "1.7";
-      'pattern' => '/const SDK_VERSION = \"((\d+)\.(\d+))\";/',
+      'file' => 'src/Mailgun/Constants/Api.php',
+      // Example: const SDK_VERSION = '1.7';
+      'pattern' => '/SDK_VERSION.*=.*[\'\"]((\d+)\.(\d+))[\'\"]/',
     ),
+    // Make the library usable:
     'files' => array(
       'php' => array('autoload.php'),
     ),
