symphonycms/symphony-2 — pull request #1840 by nitriques (2013-10-11 16:30:46+00:00)
Title: Fixed Issue #1821

Implemented the changes discussed in #1821.

This introduce a new method `appendAttachment()` which appends one attachment and does the format conversion.

Prior to my modifications, `setAttachments` always erased the content of the array. Now it appends. Not sure why I did it this way, but it did not seems legit to erase values. Passing null will clear the array though. Anyhow, if you do not like this, I could revert to the old behavior and add a new `appendAttachments()` method.

I also added lots of comments and added basic validation on recipients.

Url attachements are now handle using Gateway instead of file_get_contents.

Finally, I added a check in class.general.php to verify that `finfo_open` exists, since it is not part of the standard php package.

Please review. If you want to test this, this is a gist that does some tests. You just need to create a 'test' file in the event folder.