NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #875 most downloaded on Packagist
The Mailgun SDK provides methods for all API functions.
Latest stable
v4.5.3
Last release 24 days ago
29 Oct 2026
Release timing varies
gaps range from 4 weeks to 10 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
68 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Fix URL formatting in statusOf509Crt method by @krve in https://github.com/mailgun/mailgun-php/pull/962
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.5.2...v4.5.3
support webmozart/assert ^2.0 (#948) by @SunMar in https://github.com/mailgun/mailgun-php/pull/960
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.5.1...v4.5.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →
v4.5.2
Compare
preserve previous exception when rethrowing by @SunMar in https://github.com/mailgun/mailgun-php/pull/957
Mailgun::webhooks() no longer requires an explicit $signingKey … by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/958Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.5.0...v4.5.1
Mailgun::webhooks() no longer requires an explicit $signingKey argument.
When omitted, it falls back to the API key stored on the Mailgun instance,
restoring compatibility with pre-v4.3.7 usage patterns (issue #947).Added updated list of dimensions by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/952
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.4.0...v4.5.0
Mailgun\Api\Ip:
listIpPools() — GET /v3/ip_poolscreateIpPool(name, description) — POST /v3/ip_poolsupdateIpPool(poolId, data) — PATCH /v3/ip_pools/{pool_id} (add/remove IPs, rename, link/unlink domains)getIpPoolDomains(poolId, limit, page) — GET /v3/ip_pools/{pool_id}/domainsaddIpToPool(poolId, ip) — PUT /v3/ip_pools/{pool_id}/ips/{ip}removeIpFromPool(poolId, ip) — DELETE /v3/ip_pools/{pool_id}/ips/{ip}addIpsToPool(poolId, ips[]) — POST /v3/ip_pools/{pool_id}/ips.jsondelegateIpPool(poolId, subaccountId) — PUT /v3/ip_pools/{pool_id}/delegaterevokeDelegatedIpPool(poolId, subaccountId) — DELETE /v3/ip_pools/{pool_id}/delegateassignIpToAllDomains(ip) — POST /v3/ips/{ip}/domainsremoveIpFromAllDomains(ip, alternative) — DELETE /v3/ips/{ip}/domainslistIpsDetailed(params) — GET /v3/ips/details/allMailgun\Model\Ip\IpPoolsResponse — pool list with pool_id, name, description, ips[], is_inherited, is_linkedMailgun\Model\Ip\IpPoolResponse — single pool details (replaces incorrect UpdateResponse usage)Mailgun\Model\Ip\IpPoolDomainsResponse — paginated domain list with nextPage cursorMailgun\Model\Ip\IpReferenceResponse — async-operation responses carrying message + reference_idMailgun\Model\Ip\IpDetailsResponse — detailed IP list for /v3/ips/details/allIp API methods, including request URI/body assertions and response model property checksloadDIPPInformation() was hydrating into UpdateResponse (message-only); now correctly returns IpPoolResponsedeleteDIPP() replacement parameters ($ip, $repPoolId) were wrongly required; both are now optional (?string = null)deleteDIPP() URL was built via unsafe string concatenation; replaced with proper http_build_query constructionaddNewDIPPIntoAccount() used unsafe direct array key access ($data['description']); replaced with null-coalescing guardplaceAccountIpToBand() had a redundant Assert::stringNotEmpty() call alongside Assert::ip() on the same valueaddNewDIPPIntoAccount() marked @deprecated in favour of the explicit createIpPool(string $name, string $description) methodBackward compatible fixes for previous release. by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/951
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.7...v4.4.0
Temp fix for CI by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/942
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.6...v4.3.7
Use ubuntu-latest for all CI runs by @svenluijten in https://github.com/mailgun/mailgun-php/pull/935
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.5...v4.3.6
api secure tracking endpoint by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/932
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.4...v4.3.5
AccountManagement API endpoints:
updateAccountSettings for PUT /v5/accountsgetHttpSigningKey for GET /v5/accounts/http_signing_keycreateHttpSigningKey for POST /v5/accounts/http_signing_keygetSandboxAuthRecipients for GET /v5/sandbox/auth_recipientsAccountManagement API responses:
AccountResponseHttpSigningKeyResponseSandboxAuthRecipientsResponseMailgun class to include AccountManagement API.Add useAutomaticSenderSecurity support in DomainV4 by @matteotrubini in https://github.com/mailgun/mailgun-php/pull/928
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.3...v4.3.4
Fixed PHP 8.4 deprecations by @toooni in https://github.com/mailgun/mailgun-php/pull/926
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.2...v4.3.3
Added new API endpoint for getting metrics by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/923
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.1...v4.3.2
Add method for retrieving stored messages by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/920
create method for DomainV4.php by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/921Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.3.0...v4.3.1
Updated properties and added types to the classes properties
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.2.0...v4.3.0
Add dependabot. Change php-cs-fixer by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/898
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.1.0...v4.2.0
fix documentation URLs by @Gavrisimo in https://github.com/mailgun/mailgun-php/pull/894
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.0.1...v4.1.0
Correcting response from server in case when we have 404 error by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/891
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v4.0...v4.0.1
Better json_decode exception handling by @Pilskalns in https://github.com/mailgun/mailgun-php/pull/883
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.6.2...v3.6.3
Bugfix: TypeError caused by improper use of new self() instead of new static() in base class method (#878) by @Quarkay in https://github.com/mailgun/m
new self() instead of new static() in base class method (#878) by @Quarkay in https://github.com/mailgun/mailgun-php/pull/879Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.6.1...v3.6.2
update library by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/871
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.6.0...v3.6.1
Php code sniffer changes by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/868
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.5.9...v3.6.0
De 1078 bug with batch email sending for specific case taken from slack conversation by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-p
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.5.8...v3.5.9
Fix error Fatal error: Uncaught TypeError: Mailgun\Api\Domain::index(… by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/866
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.5.7...v3.5.8
De 993 member create multiple doesnt work by @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/857
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.5.6...v3.5.7
Changed: support bool value for method createMultiple
createMultipleCast integer values to string for sending multipart data
Added ability to make own API request to needed endpoint
Ability to update web_scheme for domain
http or https - set your open, click and unsubscribe URLs to use http or https. The default is httpWas fixed an issue with potential error Uncaught InvalidArgumentException in case of passing bool params to query. Updated php-cs-fixer
Was fixed an issue with potential error Uncaught InvalidArgumentException in case of passing bool params to query.
Updated php-cs-fixer
Fixed encoding of the urls, Updated readme
Fixed encoding of the urls, Updated readme
Support for new webhook endpoints (#609 by @svenbw & #749 by @Nyholm)
Fix double urlencoding (#747 by @uavn)
Email Validation (#726 by @uavn)
Support for PHP 8 (#727 by @DavidGarciaCat)
This release has changed the CI process from Travis CI to GitHub Actions. The reasons for this decision are:
This release has changed the CI process from Travis CI to GitHub Actions. The reasons for this decision are:
Remove deprecated Laravel package due to it is archived (#695 by @tomschlick)
^1.0 and ^2.0 for php-http/guzzle6-adapter (#680 by @boboldehampsink)reply_preference parameter (#684 by @twoonesixdigital)Force DKIM Authority when creating a Domain (#686 by @Tiboonn)log-level property for Events (#704 by @uavn)null (#639 by @indapublic)ShowResponse::getContentIdMap() (#664 by @lvdhoorn)Ip::index() now returns all IPs instead of the shared IPs (#707 by @josephshanak)All classes Mailgun\Model are final or abstract.
Mailgun\Model are final or abstract.RequestBuilder and HttpClientConfigurator to Mailgun\HttpClient namespaceMailgun::__construct()php-http/message.Nothing published for this version
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
See change log for changes.
complaints to Stats / Total ResponseSee change log for changes.
See change log for changes.
$mailgun = Mailgun::create('key', 'server');Mailgun\Api\AttachmentMessageBuilder and BatchMessageMailgun\Message\MessageBuilder::addBccRecipient() is now optional.Ported MessageBuilder and BatchMessage #472
Support for 413 HTTP status codes, when we send too large payloads to the API
Add new Suppressions::getTotalCount() method
Suppressions::getTotalCount() methodREADME.md fileTags on UnsubscribeMailgun\Exception\HttpServerExceptionSee change log for changes.
See change log for changes.
HttpClientException::getResponseCode()AbstractDomainResponse that VerifyResponse and CreateResponse extends.WebhookIndexResponse.TotalResponse that caused the content to be empty.Domain::create to be optional.Fixed typo in DnsRecord::isValid. This make sure the correct result of the function is returned.
Fixed typo in DnsRecord::isValid. This make sure the correct result of the function is returned.
See change log for changes.
See change log for changes.
php-http/multipart-stream-builderSee change log for changes.
See change log for changes.
MessageBuilder we surround the recipient name with double quotes instead of single quotes.Make sure to reset MultipartStreamBuilder after Stream was created.
Make sure to reset MultipartStreamBuilder after Stream was created.
MultipartStreamBuilder after a stream is built.See change log for changes.
See change log for changes.
$mailgun->messages()->sendMime()See Readme and change log for changes
We created a new API.
See Readme and change log for changes
This version contains a new way of using the API. Each endpoint return a domain object and the endpoints are grouped like the API documentation.
Mailgun\Exception.Mailgun\Exception namespace.HttpClientConfigurator to configure the HTTP client.History and ReplaceUriPluginMailgun\Mailgun::getLastResponse()Mailgun\Connection\RestClient::getAttachment($url)The following classes will be removed in version 3.0.
Mailgun\Connection\Exceptions\GenericHTTPErrorMailgun\Connection\Exceptions\InvalidCredentialsMailgun\Connection\Exceptions\MissingEndpointMailgun\Connection\Exceptions\MissingRequiredParametersMailgun\Connection\Exceptions\NoDomainsConfiguredMailgun\Connection\RestClientMailgun\Constants\ApiMailgun\Constants\ExceptionMessagesMailgun\Mailgun::$resetClientMailgun\Mailgun::sendMessage()Mailgun\Mailgun::verifyWebhookSignature()Mailgun\Mailgun::post()Mailgun\Mailgun::get()Mailgun\Mailgun::delete()Mailgun\Mailgun::put()Mailgun\Mailgun::setApiVersion()Mailgun\Mailgun::setSslEnabled()Mailgun\Mailgun::MessageBuilder()Mailgun\Mailgun::OptInHandler()Mailgun\Mailgun::BatchMessage()Bug fixes with multiple recipients, inline images and attachments.
Declare BatchMessage::endpointUrl
[Security] Strict comparison of hash (#117) Thank you @gaomd
Added webhook signature verification - (#50: @gmacon) Test PHP 5.6 and HHVM - (#51: @Nyholm) Improved error handling - (#48: @nathanntg) Fixed attachm
Added webhook signature verification - (#50: @gmacon) Test PHP 5.6 and HHVM - (#51: @Nyholm) Improved error handling - (#48: @nathanntg) Fixed attachment handling in Message Builder - (#56 @jchamberlain) Allow any data type in custom data - (#57: @jchamberlain) Return non-JSON response data - (#60: @jchamberlain) Removed legacy closing braces - (#64: @travelton)
Improvements: Improved security of OptInHandler - (#31: @travelton) Fixed typo for including an Exception - (#41: @Milannv) Fixed Mocks, removed unnec
Improvements: Improved security of OptInHandler - (#31: @travelton) Fixed typo for including an Exception - (#41: @Milannv) Fixed Mocks, removed unnecessary code, applied styling - (#44 & #42: @icambridge) Less restrictive Guzzle requirement - (#45: @frisvold)
SubAccount support @oleksandr-mykhailenko in https://github.com/mailgun/mailgun-php/pull/886
Full Changelog: https://github.com/mailgun/mailgun-php/compare/v3.6.3...v4.0
Migrated to PHP-HTTP (#94: @Nyholm)
Changes:
Note: the way Mailgun-php is initialized has changed; please view the README.
Updated to Guzzle5 (#79: @Nyholm)
Changes:
Thanks for the contributions, everybody!
patched bug for attachments related to duplicate aggregator bug in Guzzle (#32 @travelton)
Bugfixes:
patched bug for attachments related to duplicate aggregator bug in Guzzle (#32 @travelton)
One column per quarter.