swiftmailer/swiftmailer — pull request #278 by bmurashin (2013-01-11 16:20:16+00:00)
Title: Make a copy of message in MemorySpool instead of reference

Consider you create a `Swift_Message`, send it (spool actualy), then modify a bit and send again. Scenarios:
1. A small (~10) number of personalized messages - modifing only `To` and `Body` parts. Passing them by refence to spool will end up flooding with 10 equal messages to the same address.
2. I'm sending 2 copies of online orders - one to managers and one to customer - same message with `To` and `ReplyTo` swapped.

Futhermore, that creates inconsistent behavior between `FileSpool` and `MemorySpool` - File will spool different messages, Memory will spool equal messages.

This commit possibly doubles memory usage for messages - if someone creating an array of messages in a controller, but who wants to do that? Normaly meassage is created, spooled, then unset - this way only actively spooled message is doubled in memory.