Commit Graph

182 Commits

Author SHA1 Message Date
Tobias Nyholm
b79dc5fdb8 Merge pull request #152 from Nyholm/inline-complexity
Reduce code complexity on addInlineImage
2016-08-10 17:18:57 +02:00
Travis Swientek
0a7c96c34a Fixed inline image issue. Added new tests. 2016-08-10 16:37:08 +02:00
Tobias Nyholm
3114b8a17a Reduce code complexity 2016-08-05 09:44:49 +02:00
David Garcia
817dad1f90 Applied fixes from StyleCI 2016-07-24 07:42:47 -04:00
David Garcia
8da94ac190 PHP CS Fixer 2016-07-24 12:41:21 +01:00
David Garcia
09eda3df13 PHP Code Sniffer 2016-07-24 12:40:50 +01:00
Tobias Nyholm
6275b2b796 Merge pull request #112 from nebkam/patch-1
Declare endpointUrl field
2016-07-21 01:02:09 +02:00
Tobias Nyholm
2cc6ee8c77 Completly removed depenency on Guzzle and made discovery easier 2016-07-21 00:05:23 +02:00
Sergey Obukhov
b8a0abc075 Merge pull request #138 from Nyholm/issue-122
Build a string query form array
2016-07-20 14:56:59 -07:00
Sergey Obukhov
7844883c86 Merge pull request #117 from gaomd/fix-signature-check
Strict check of signature
2016-07-20 14:46:35 -07:00
Sergey Obukhov
c808bbeec1 Merge branch 'develop' of https://github.com/YupItsZac/mailgun-php into YupItsZac-develop
Conflicts:
	src/Mailgun/Mailgun.php
2016-07-20 12:44:05 -07:00
Sergey Obukhov
341e06a196 Merge pull request #90 from z38/fix-webhook-notices
Fix notices on empty webhook requests
2016-07-20 12:34:11 -07:00
Sergey Obukhov
a0d10c47fb Merge pull request #121 from TemirkhanN/master
PHPdoc typos, minor performance changes
2016-07-20 12:31:41 -07:00
Sergey Obukhov
280eead0ea Merge pull request #98 from MatissJanis/patch-1
Fix spelling
2016-07-20 12:24:35 -07:00
Tobias Nyholm
1cdfc3c204 Added header 2016-07-19 15:00:29 +02:00
Tobias Nyholm
75614bf294 Build a string query form array
Fix issue #122
2016-07-19 14:58:31 +02:00
=
e921db5cc9 Added var types to docblock 2016-06-22 23:04:31 +02:00
=
8c97f6f451 Updated docblock for sendMessage function to include @return and @throws 2016-06-22 23:00:27 +02:00
temirkhan
30b4aa5e9a Little fix in responseHandler switch case:
throwing exception prevents next code execution, so it was unnecessary to use breaks. And also use return in case that differs from 200
2016-04-20 12:00:50 +03:00
temirkhan
2d9cd57d2e PHPDoc typos fixed, minor performance changes 2016-04-19 15:27:12 +03:00
Mengdi Gao
20422956e8 Strict check of signature 2016-04-11 00:26:34 +08:00
Nebojša Kamber
6a8f2dd424 Declare endpointUrl field
To avoid `field declared dynamically` and `field not found` warnings in IDEs
2016-03-29 12:14:40 +02:00
Tobias Nyholm
b85f1461d4 Removed unused tests and some parameters from the constructor 2016-03-05 11:13:28 +01:00
Tobias Nyholm
b961cfb4eb Updated to latest version of Httplug and made auto discovery optional 2016-02-26 12:04:54 +01:00
Tobias Nyholm
7f3d637756 Updated to reflect changes in PHP-HTTP 2015-11-18 15:46:53 +01:00
Matīss Jānis Āboltiņš
f5a37188df Fix spelling 2015-11-13 12:30:23 +02:00
Tobias Nyholm
a0edd0eb30 Updates to the php-http library 2015-10-30 14:36:08 +01:00
Tobias Nyholm
78f252761e Updated the php-http lib 2015-10-30 14:28:43 +01:00
Tobias Nyholm
b8420451c7 Added docs 2015-10-13 08:59:43 +02:00
Tobias Nyholm
4131802de2 Changed according to Rubens suggestions 2015-10-12 22:46:30 +02:00
Tobias Nyholm
61d03262a9 Removed dependency on Happyr/AutoDiscovery 2015-10-12 19:23:58 +02:00
Tobias Nyholm
ad015ce441 code style 2015-10-03 23:27:50 +02:00
Tobias Nyholm
b080b181ac Make sure we do not depend on any http transport library 2015-10-03 22:10:48 +02:00
z38
1f555c2f27 Fixed notices on empty webhook requests 2015-09-13 20:01:16 +02:00
Anders Munk
04f1baa2fd Updated rest client to use PSR7. No phpunit tests yet; will come soon. Manual sending message to mailgun API works. 2015-07-23 14:25:28 +02:00
Jesse Spears
225e800595 Bump getResponseExceptionMessage to GuzzleHttp version 5 2015-05-06 10:52:51 -07:00
Tobias Nyholm
3bb69d8cbe * Updated composer.json to guzzle v5
* Don't allow HHVM to fail
* Updated RestClient to Guzzle5
* Removed php5.3 from travis.
* Bugfix and removed debug code
2015-05-05 18:19:10 -07:00
Wietse de Vries
edae22eba4 Updated default API version from v2 to v3
http://blog.mailgun.com/default-api-version-now-v3/
2015-05-05 18:18:08 -07:00
CupOfTea696
e1406e3936 Shows response message on 400, 401 and 404 errors
Adds the actual response message to the errors thrown on 400, 401 and
404 response codes. This provides a lot more useful info than the
current messages. The message doesn’t really give you much to go one. I
spent hours trying to find what I did wrong, double checking my API
keys and looking up the error on google.
2015-05-05 18:18:08 -07:00
Michael Crawford
5043a49969 *Fixed class docblock (mainly fixed so that travis-ci would trigger a build) 2014-11-20 12:52:37 -06:00
Michael Crawford
67ae7c4137 * Removed unnecessary constructor
* Added function docblocks
* Changed class docblock to include link to lists readme
2014-11-20 12:44:33 -06:00
Michael Crawford
4924b597f4 * Added php docblocks to functions and member variables.
* Changed constants to use new constant classes.
* Changed class docblock to include link to readme file
* Moved function descriptions of sendMessage() and verifyWebhookSignature() methods to function docblocks
2014-11-20 12:41:25 -06:00
Michael Crawford
7fed60d881 * Changed class docblock to include link to readme for instructions.
* Added docblocks for functions and member variables.
* Updated constants to use constants classes
* Changed finalize() - removing the return (since the sendMessage() method already does not return anything)
2014-11-20 12:38:05 -06:00
Michael Crawford
3e55c2bcd2 Changed class docblock and added a link to the readme file with instructions 2014-11-20 12:35:37 -06:00
Michael Crawford
435ac1a3b8 Updated constants based on constant class changes. Also added php docblocks to all functions and member variables. 2014-11-20 12:29:15 -06:00
Michael Crawford
591f6a4538 Constants.php
* Removed file

Api.php
 * New class made for Api-related constants

ExceptionMessages.php
 * New class made for Exception Messages constants

Essentially, just moved the constants out into their own classes. Using classes so that it isn't necessary to do an include/require on any other files, just import the class.
2014-11-20 12:28:39 -06:00
Michael Crawford
e1e2ed796f Added php docblock comments and changed constants to use newly created constant classes 2014-11-20 12:12:06 -06:00
Travis Swientek
45ec0c8f3a Merge branch 'master' of https://github.com/mailgun/mailgun-php into travis/merging 2014-11-19 14:31:03 -08:00
Travis Swientek
b28a742efb Merge branch 'verifyWebhookSignature' of https://github.com/gmacon/mailgun-php into gmacon-verifyWebhookSignature
Conflicts:
	src/Mailgun/Mailgun.php
2014-11-19 14:29:08 -08:00
Travis Swientek
59299b7fbf Merge branch 'master' of https://github.com/nathanntg/mailgun-php into nathanntg-master
Conflicts:
	src/Mailgun/Connection/Exceptions/GenericHTTPError.php
2014-11-19 14:22:40 -08:00
Travis Swientek
d744b0a809 Merge pull request #56 from jchamberlain/master
Don't require @ prefix for attachment filenames
2014-11-17 17:28:32 -08:00
Travis Swientek
24085530d9 Merge pull request #57 from jchamberlain/custom-data
Allow any data type for custom data
2014-11-17 17:25:43 -08:00
Travis Swientek
0a62c7cbe1 Merge pull request #60 from jchamberlain/raw-response
Return non-JSON response data
2014-11-17 17:24:52 -08:00
Travis Swientek
f781158019 Removed legacy PHP closing braces 2014-10-06 15:53:33 -07:00
Joshua Chamberlain
c6346e80df Return non-JSON response data 2014-09-15 16:01:24 -07:00
Joshua Chamberlain
f2af6df726 Allow any data type for custom data 2014-09-08 12:11:04 -07:00
Joshua Chamberlain
a674addd2a Don't require @ prefix for attachment filenames 2014-09-05 15:07:55 -07:00
George Macon
46f63044ad Add Mailgun->verifyWebhookSignature 2014-06-24 17:36:21 -04:00
Nathan Perkins
5084053ec3 Preserve lack of line endings. 2014-06-16 10:48:56 -04:00
Nathan Perkins
ba8e7bda43 Throw more detailed generic HTTP error
Take advantage of new response code and body properties to allow better logging.
2014-06-16 10:40:18 -04:00
Nathan Perkins
9fe01151af Add HTTP properties to generic error
Allows generic HTTP error to accept more detailed information about the response from the server.
2014-06-16 10:38:42 -04:00
Iain Cambridge
6196f8df49 Add setMessage 2014-05-14 14:03:12 +01:00
Iain Cambridge
103fa04ede Whitespace changes. (Probably some PSR-2 stuff as well 2014-05-13 16:53:40 +01:00
Iain Cambridge
bdeadc1a01 Add tests to ensure exceptions are flung and fixed wrong variable name used 2014-05-13 16:12:32 +01:00
Iain Cambridge
35c65aaa57 Removed apiKey member since it's not used anywhere. 2014-05-13 14:59:11 +01:00
Iain Cambridge
34d8203262 Removed pointless try and catch. None of the functions threw an exception and it was just rethrowing. Also Exception didn't exist in that namespace 2014-05-13 14:58:12 +01:00
Iain Cambridge
33f3d27d7b Move fclose and unlink to before the return so they're actually called. 2014-05-13 14:57:23 +01:00
Iain Cambridge
502fac0b37 Fix fatal error in not finding exception.
Tried to throw MissingRequiredMIMEParameters which didn't exist in current namespace or added via use. Connection exceptions was included by MissingRequiredMIMEParameters is in messages exceptions so changed the added exception name to messages.

Exception message constant didn't exist. So added it.
2014-05-13 14:54:10 +01:00
Milannv
9b4668c564 Fixed typo for including an Exception 2014-03-10 13:40:59 +01:00
Travis Swientek
15f38e3737 Merge pull request #31 from travelton/ImproveOptInSecurity
Improved security of OptInHandler.
2014-02-14 10:53:02 -08:00
Travis Swientek
8d23a5bb9f This patch swaps the aggregator to "PHPAggregator" if files are included. Also added straight download. 2014-01-30 17:05:40 -08:00
Travis Swientek
717cf5faed Improved security of OptInHandler. 2014-01-24 22:07:53 +00:00
Travis Swientek
d3a0d6aed9 Fixed Guzzle post/put field aggregation. 2014-01-14 00:45:34 +00:00
Travis Swientek
af53fd50ff Ability to rename attachments and inline images. 2014-01-13 22:53:34 +00:00
Nils Magnus Englund
1b4ab0ced1 In README.md, added getFiles() reference to MessageBuilder example 2013-12-10 14:48:01 +01:00
Travis Swientek
c82fc3a578 Merge pull request #23 from travelton/DisableSSLOption
Add ability to disable SSL (backward compatible).
2013-12-02 10:30:46 -08:00
Travis Swientek
72c10a5428 Added ability to disable SSL for testing against a Postbin or other endpoint. 2013-11-30 11:47:03 -08:00
Travis Swientek
5d7daeeeca Added method to return all message ids after a BatchMessage operation. 2013-10-11 17:31:04 -07:00
Travis Swientek
af853234e4 Refactored counters, batch job trigger adjustment, all recipient types in variables. 2013-10-11 13:36:35 -07:00
Travis Swientek
fc9685182b Fixed missing IDs for batch message recipients. Closes #15. 2013-10-07 13:53:23 -07:00
Nils Magnus Englund
dc8e7fea9e Update README.md, fixed MessageBuilder example
The $domain element was not processed in the single quotes. Changed to double quotes.
2013-09-18 15:37:32 +02:00
Travis Swientek
116fb33255 Relaxed Guzzle requirement, fixed reply-to bug, updated point release version. Fixes #7 Fixes #9 2013-09-12 14:19:23 -07:00
dboggus
73de421dbe Update MessageBuilder.php
Fixed misspelling of Exceptions in use statements.
2013-09-10 09:30:17 -05:00
Travis Swientek
a624027a42 Adjusted an exception message, tagged for next point release 1.2. 2013-09-05 14:53:27 -07:00
yoye
c445c4d851 Fix typo in responseHandler 2013-09-05 15:34:17 +02:00
yoye
95cc29e56b Fix typo in responseHandler 2013-09-05 15:26:42 +02:00
yoye
947267e935 Merge branch 'master' of github.com:yoye/mailgun-php 2013-09-05 15:19:07 +02:00
yoye
4c80ff1058 Fix variables in BatchMessage:sendMessage() 2013-09-05 10:39:20 +02:00
yoye
789eb27228 Fix bug toRecipientCount increment in BatchMessage 2013-09-05 10:35:26 +02:00
Travis Swientek
9438694415 Fixes #4. DEFAULT_TIME_ZONE is not defined. 2013-09-04 09:50:50 -07:00
yoye
a1418420d0 Update MessageBuilder.php 2013-09-04 16:18:40 +02:00
Travis Swientek
24e6a01651 Added message id return to batch sending. 2013-08-21 23:11:24 -07:00
Travis Swientek
0cabcece33 Incremented SDK Version 2013-08-21 16:35:34 -07:00
Travis Swientek
f8babb0541 Fixed an issue with Exception handling. 2013-08-21 09:45:11 -07:00
Travis Swientek
d88fb82c1d ReadMe Adjustments and fixed an issue with result handler. 2013-08-20 11:10:57 -07:00
Travis Swientek
89a2e8bd09 Updated README 2013-08-19 14:56:13 -07:00
Travis Swientek
522f731929 Updated README files and fixed a bug in OptInHandler 2013-08-16 14:05:58 -07:00
Travis Swientek
143414f174 Rename README to README.md 2013-08-16 13:10:52 -07:00
Travis Swientek
4ff1184b0b README.md adjustments 2013-08-16 12:50:29 -07:00
Travis Swientek
07837600e6 Added new OptInHandler and tests. 2013-08-16 11:20:01 -07:00