mailgun/mailgun-php
The Mailgun SDK provides methods for all API functions.
v4.5.1
32M downloads/mo
#874 most downloaded on Packagist
mailgun/mailgun-php
What this package is like to depend on
Last release 2 months ago
23 Jun 2026
Release timing varies
gaps range from 4 weeks to 10 months
Most releases are documented
notes for 52 of 64 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
66 releases · first in 2013
5 releases in the last 12 months
see the full history below
Release timeline
66 releases · Aug 2013 to Jun 2026Releases
latest 60 of 66-
v4.5.123 Jun 2026Release notes
Open source →What's Changed
- preserve previous exception when rethrowing by @SunMar in #957
-
Mailgun::webhooks()no longer requires an explicit$signingKey… by @oleksandr-mykhailenko in #958
New Contributors
Full Changelog: v4.5.0...v4.5.1
Release notes
Open source →Fixed
Mailgun::webhooks()no longer requires an explicit$signingKeyargument. When omitted, it falls back to the API key stored on theMailguninstance, restoring compatibility with pre-v4.3.7 usage patterns (issue #947).
-
v4.5.029 Apr 2026Release notes
Open source →What's Changed
- Added updated list of dimensions by @oleksandr-mykhailenko in #952
- Dynamic Ip Pools by @oleksandr-mykhailenko in #953
- Ip classes imporvements by @oleksandr-mykhailenko in #954
- version update by @oleksandr-mykhailenko in #955
Full Changelog: v4.4.0...v4.5.0
Release notes
Open source →Added
- Completed IP Pools (DIPP) API coverage — all 11 remaining endpoints now implemented in
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/all
- Added 5 new response model classes:
Mailgun\Model\Ip\IpPoolsResponse— pool list withpool_id,name,description,ips[],is_inherited,is_linkedMailgun\Model\Ip\IpPoolResponse— single pool details (replaces incorrectUpdateResponseusage)Mailgun\Model\Ip\IpPoolDomainsResponse— paginated domain list withnextPagecursorMailgun\Model\Ip\IpReferenceResponse— async-operation responses carryingmessage+reference_idMailgun\Model\Ip\IpDetailsResponse— detailed IP list for/v3/ips/details/all
- Added 31 tests covering all
IpAPI methods, including request URI/body assertions and response model property checks
Fixed
loadDIPPInformation()was hydrating intoUpdateResponse(message-only); now correctly returnsIpPoolResponsedeleteDIPP()replacement parameters ($ip,$repPoolId) were wrongly required; both are now optional (?string = null)deleteDIPP()URL was built via unsafe string concatenation; replaced with properhttp_build_queryconstructionaddNewDIPPIntoAccount()used unsafe direct array key access ($data['description']); replaced with null-coalescing guardplaceAccountIpToBand()had a redundantAssert::stringNotEmpty()call alongsideAssert::ip()on the same value
Changed
addNewDIPPIntoAccount()marked@deprecatedin favour of the explicitcreateIpPool(string $name, string $description)method
-
v4.4.021 Mar 2026Release notes
Open source →What's Changed
- Backward compatible fixes for previous release. by @oleksandr-mykhailenko in #951
Full Changelog: v4.3.7...v4.4.0
-
v4.3.722 Feb 2026Release notes
Open source →What's Changed
- Temp fix for CI by @oleksandr-mykhailenko in #942
- Prepare release by @oleksandr-mykhailenko in #945
- Use subaccount model in create API response by @svenluijten in #934
- Update HttpApi.php by @omar-angelino in #940
- Add missing query parameters to Domain::index() methods by @Akrilla in #939
- Prepare release by @oleksandr-mykhailenko in #946
- Use webhook signing key instead of API key for webhook signature verification by @damiantw in #819
- Move dependabot config by @svenluijten in #936
- Update README.md by @jezemery in #937
New Contributors
- @omar-angelino made their first contribution in #940
- @Akrilla made their first contribution in #939
- @damiantw made their first contribution in #819
- @jezemery made their first contribution in #937
Full Changelog: v4.3.6...v4.3.7
-
v4.3.618 Jan 2026Release notes
Open source →What's Changed
- Use ubuntu-latest for all CI runs by @svenluijten in #935
- docs: fix broken documentation URLs by @mshcherb in #941
- fix Mailgun API key placeholder by @mshcherb in #943
New Contributors
- @svenluijten made their first contribution in #935
- @mshcherb made their first contribution in #941
Full Changelog: v4.3.5...v4.3.6
-
v4.3.506 Apr 2025Release notes
Open source →What's Changed
- api secure tracking endpoint by @oleksandr-mykhailenko in #932
-
4.3.5 by @oleksandr-mykhailenko in #933
Full Changelog: v4.3.4...v4.3.5
Release notes
Open source →- Implemented
AccountManagementAPI endpoints:updateAccountSettingsforPUT /v5/accountsgetHttpSigningKeyforGET /v5/accounts/http_signing_keycreateHttpSigningKeyforPOST /v5/accounts/http_signing_keygetSandboxAuthRecipientsforGET /v5/sandbox/auth_recipients
- Added model classes for
AccountManagementAPI responses:AccountResponseHttpSigningKeyResponseSandboxAuthRecipientsResponse
- Updated
Mailgunclass to includeAccountManagementAPI.
-
v4.3.402 Apr 2025Release notes
Open source →What's Changed
- Add useAutomaticSenderSecurity support in DomainV4 by @matteotrubini in #928
- Remove extra validation by @oleksandr-mykhailenko in #929
- Domain Keys API Endpoints by @oleksandr-mykhailenko in #930
- De 1507 mailgun php increase max tag limit to 10 per message by @oleksandr-mykhailenko in #931
New Contributors
- @matteotrubini made their first contribution in #928
Full Changelog: v4.3.3...v4.3.4
-
v4.3.329 Dec 2024Release notes
Open source →What's Changed
- Fixed way of sending request with JSON body. loadMetrics works. Adjus… by @oleksandr-mykhailenko in #927
- Fixed PHP 8.4 deprecations by @toooni in #926
New Contributors
Full Changelog: v4.3.2...v4.3.3
Release notes
Open source →- Fixed way of sending request with JSON body. loadMetrics works. Adjusted tests. Fixed warning related to the php 8.4 and nullable types
-
v4.3.226 Sep 2024Release notes
Open source →What's Changed
- Added new API endpoint for getting metrics by @oleksandr-mykhailenko in #923
Full Changelog: v4.3.1...v4.3.2
Release notes
Open source →- Added new API endpoint for getting metrics @see https://documentation.mailgun.com/docs/mailgun/api-reference/openapi-final/tag/Metrics/
-
v4.3.117 Aug 2024Release notes
Open source →What's Changed
- Add method for retrieving stored messages by @oleksandr-mykhailenko in #920
- Add missed params to the
createmethod for DomainV4.php by @oleksandr-mykhailenko in #921
Full Changelog: v4.3.0...v4.3.1
Release notes
Open source →- Add method for retrieving stored messages by @oleksandr-mykhailenko in #920
- Add missed params to the create method for DomainV4.php by @oleksandr-mykhailenko in #921
-
v4.3.010 Aug 2024Release notes
Open source →- End of support php 7.3
- Updated properties and added types to the classes properties
- Update code style
- Add missed field into IndexResponse for Webhooks
- Fixed template search filters
- Fixed tags API endpoints
- Added new API endpoints
-
v4.2.009 Mar 2024 -
v4.1.010 Feb 2024Nothing published for this version
-
v4.0.108 Jan 2024Release notes
Open source →- Fix wrong classes in tests
- Fixed response in case of 404 http error. Respect server error message
-
v3.6.301 Dec 2023Nothing published for this version
-
v3.6.227 Nov 2023Release notes
Open source →- Bugfix: TypeError caused by improper use of new self() instead of new static() in base class method
-
v3.6.127 Oct 2023Release notes
Open source →- update library
- Improvement: SDK version headers v2 vs v3
- Update packages by @oleksandr-mykhailenko
-
v3.6.013 Aug 2023Nothing published for this version
-
v3.5.919 Jul 2023 -
v3.5.823 Jun 2023Nothing published for this version
-
v3.5.726 May 2023Nothing published for this version
-
v3.5.608 Apr 2023 -
v3.5.519 Sep 2022 -
v3.5.425 Aug 2022 -
v3.5.319 Aug 2022Release notes
Open source →Added
- Ability to update web_scheme for domain
httporhttps- set your open, click and unsubscribe URLs to use http or https. The default is http
-
v3.5.223 Jul 2022Nothing published for this version
-
v3.5.116 Aug 2021Release notes
Open source →Fixed
- Error with empty array for param recipient-variables. Fix was suggested by @deviarte
- Use null coalescing operator in IndexResponse.php when. Fix proposed by @TWithers
-
3.5.008 Mar 2021Release notes
Open source →Added
- Support for new webhook endpoints (#609 by @svenbw & #749 by @Nyholm)
-
3.4.128 Feb 2021 -
3.4.001 Feb 2021Release notes
Open source →Added
- Email Validation (#726 by @uavn)
- Please note the Email Validation requires always to use the US servers. The Mailgun Team didn't enable this service on the European endpoints.
- Email Validation (#726 by @uavn)
-
3.3.030 Jan 2021Release notes
Open source →Added
- Support for PHP 8 (#727 by @DavidGarciaCat)
- Added
opened,clicked,unsubscribedandstoredto theTotalResponseItem(#739 by @Arkitecht)
Removed
- Support for PHP 7.1 and 7.2 as they both have reached their end of life
-
3.2.025 Nov 2020Release notes
Open source →Added
- Domain tracking implementation (#711 by @uavn)
- Mailing list validation (#712 by @uavn)
- Suppression Whitelists (#713 by @uavn)
Fixed
- Added pagination to tags (#717 by @uavn)
Changed
- Expect Client to be of type ClientInterface or PluginClient (#660 by @tonythomas01)
-
3.1.008 Oct 2020Release notes
Open source →Added
- Suppressions allow now deleting an address passing an optional tag (#643 by @iwahara)
- Allow both
^1.0and^2.0forphp-http/guzzle6-adapter(#680 by @boboldehampsink) - Add support for Mailing List
reply_preferenceparameter (#684 by @twoonesixdigital) - Add support for
Force DKIM Authoritywhen creating a Domain (#686 by @Tiboonn) - Add support for PHP 7.4 (#698 by @snapshotpl)
- Allow assigning a domain to a list of ips during creation (#703 by @josephshanak)
- Add unmapped
log-levelproperty for Events (#704 by @uavn)
Fixed
- Provide the Member's name just when it's not
null(#639 by @indapublic) - Fix typehint for Message
ShowResponse::getContentIdMap()(#664 by @lvdhoorn) - Fix endpoint for Domain's API (#668 by @tomschlick)
- Webhook support for array handling (#675 by @martin-sanjuan)
- Fix parameter name when assigning an IP to the specified Domain (#702 by @josephshanak)
Ip::index()now returns all IPs instead of the shared IPs (#707 by @josephshanak)
Changed
- Updated examples for Debugging and Hydrator usage (#634 by @tonybolzan and #681 by @Jiia)
- Updated link to the Mailgun Documentation page (#688 by @Casmo)
- Remove deprecated Laravel package due to it is archived (#695 by @tomschlick)
Removed
- Remove method for non-existing Stats URL (#705 by @uavn)
-
3.0.013 Sep 2019Release notes
Open source →Added
- Support for PSR-4
- All classes
Mailgun\Modelare final or abstract.
Changed
- Dropped PHP5 support
- Removed deprecated code
- Moved
RequestBuilderandHttpClientConfiguratortoMailgun\HttpClientnamespace - Updated signature of
Mailgun::__construct()
Removed
- Dependency on
php-http/message.
-
3.0.0-beta229 Aug 2019 pre-releaseNothing published for this version
-
3.0.0-beta109 Apr 2019 pre-releaseNothing published for this version
-
2.8.102 Feb 2019 -
2.8.006 Jan 2019Release notes
Open source →Added
- Add support for IPs endpoints
- Add spport for Mailing Lists
- Add
complaintsto Stats / Total Response - Add more tests for our models
Changed
- Change the PHP Exception message for Bad Request errors to help to find the issue
Fixed
- Fix an issue validating the max path length
-
2.7.005 Jan 2019Release notes
Open source →Added
- Allow to set the Mailgun server when instantiating the Mailgun's client:
$mailgun = Mailgun::create('key', 'server'); - Add new PHPUnit tests for our models
- Add new PHPUnit tests for our API
- Added
Mailgun\Api\Attachment - Fluent interface for
MessageBuilderandBatchMessage - Support for HTTPlug 2.0
Changed
- Second argument to
Mailgun\Message\MessageBuilder::addBccRecipient()is now optional. - We try to close open resources
Fixed
- Fixed the type error when creating tags.
- Allow to set the Mailgun server when instantiating the Mailgun's client:
-
2.6.004 Aug 2018Release notes
Open source →Added
- Ported MessageBuilder and BatchMessage #472
Changed
- Cast campaign IDs to string #460
- Suggest packages used on Dev #440
-
2.5.008 Apr 2018Release notes
Open source →Added
- Support for 413 HTTP status codes, when we send too large payloads to the API
-
2.4.101 Feb 2018Release notes
Open source →Added
- Add new
Suppressions::getTotalCount()method
Changed
- Apply fixes from StyleCI
- Updated
README.mdfile
Fixed
- Fix
TagsonUnsubscribe - Fix typo on
Mailgun\Exception\HttpServerException
- Add new
-
v2.4.007 Dec 2017Release notes
Open source →Added
- Add cached property for DNS record
- Add domain verification
HttpClientException::getResponseCode()- Added
AbstractDomainResponsethatVerifyResponseandCreateResponseextends.
Fixed
- Possible empty content of
WebhookIndexResponse. - Typo in
TotalResponsethat caused the content to be empty.
Changed
- Allow some parameters to
Domain::createto be optional.
-
2.3.420 Jun 2017Release notes
Open source →Fixed
- Typo in DnsRecord::isValid. This make sure the correct result of the function is returned.
-
v2.3.303 Jun 2017Release notes
Open source →Changed
- Using stable version of
php-http/multipart-stream-builder - Improved tests
- Using stable version of
-
v2.3.216 May 2017Release notes
Open source →Fixed
- When parsing an address in
MessageBuilderwe surround the recipient name with double quotes instead of single quotes.
- When parsing an address in
-
v2.3.111 May 2017Release notes
Open source →Fixed
- Make sure to reset the
MultipartStreamBuilderafter a stream is built.
- Make sure to reset the
-
v2.3.014 Apr 2017Release notes
Open source →Added
- Support for sending messages with Mime.
$mailgun->messages()->sendMime()
- Support for sending messages with Mime.
-
v2.2.008 Apr 2017Release notes
Open source →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.
Added
- Api classes in Mailgun\Api*
- Api models/responses in Mailgun\Model*
- Added Hydrators to hydrate PSR-7 responses to arrays or domain objects.
- All exceptions extend
Mailgun\Exception. - New exceptions in
Mailgun\Exceptionnamespace. - Added
HttpClientConfiguratorto configure the HTTP client. - Added HttpClient plugins
HistoryandReplaceUriPlugin - Assertions with Webmozart\Assert
Mailgun\Mailgun::getLastResponse()Mailgun\Connection\RestClient::getAttachment($url)- Clear license information
Fixed
- Fix disordered POST parameters. We do not use array syntax.
- Code styles
Deprecated
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()
-
v2.1.210 Aug 2016Release notes
Open source →- Bug fixes with multiple recipients, inline images and attachments.
- Added more tests
- Using PSR-2 code style
-
v2.1.121 Jul 2016Release notes
Open source →- Require php-http/message (#142)
- Declare BatchMessage::endpointUrl (#112)
-
v2.1.020 Jul 2016Release notes
Open source →- Strict comparison of hash (#117)
- No dependency on Guzzle/PSR7 (#139)
- Build URL string form an array (#138)
- Docblock update (#134)
- Minor fixes (#90, #121, #98)
-
v1.7.219 Nov 2014Release notes
Open source →- Added webhook signature verification - (#50)
- Test PHP 5.6 and HHVM - (#51)
- Improved error handling - (#48)
- Fixed attachment handling in Message Builder - (#56)
- Allow any data type in custom data - (#57)
- Return non-JSON response data - (#60)
- Removed legacy closing braces - (#64)
-
v1.7.127 May 2014Release notes
Open source →- Improved security of OptInHandler - (#31)
- Fixed typo for including an Exception - (#41)
- Fixed Mocks, removed unnecessary code, applied styling - (#44 & #42)
- Less restrictive Guzzle requirement - (#45)
-
v4.016 Dec 2023Nothing published for this version
-
v2.002 Apr 2016Nothing published for this version
-
v1.806 May 2015Nothing published for this version
-
v1.731 Jan 2014Nothing published for this version
-
1.615 Jan 2014Release notes
Open source →Enhancement:
- adjust file attachment/inline name (#21 @travelton)
Bugfixes:
- fixed issue with unordered route actions (#23 @travelton)
-
1.505 Dec 2013Release notes
Open source →Enhancement:
- added ability to define non-https endpoint for debugging purposes (#23 @travelton)