allow callbacks to modify attachements by moving the decision to calculate boundary value into the correct position inside _render()
Test to proof that render itself should handle the boundary.
also move protected variable resetting into the correct scope
Merge pull request #1375 from dereuromark/master-cake-email

Move boundary calculation inside _render()