Znarkus / postmark-php

Postmark PHP class
http://developer.postmarkapp.com/developer-libs.html#php-5
139 stars 49 forks source link

Added the ability to return the message ID instead of boolean on ->send() (Take 2) #16

Closed beauwest closed 12 years ago

beauwest commented 12 years ago

Here's the second iteration. Let me know what you think.

beauwest commented 12 years ago

I decided to make it an option off of send, just to make absolutely sure it doesn't break anyone's code. If they're looking for

->send === true 

It would break.

Znarkus commented 12 years ago

Good, I like it!

Would you mind changing public function send($returnId = false) to something like public function send($options = array())? That could then be used like this: ->send(array('returnMessageId' => true)), which is more readable imo.

beauwest commented 12 years ago

Done.

Znarkus commented 12 years ago

Thanks! Out of curiosity, why do you use !empty( instead of !isset(?

beauwest commented 12 years ago

In case they set it to false manually. Empty catches false or blank, or not set.

Znarkus commented 12 years ago

Thanks!