fusionbox/django-emailtools — pull request #3 by rockymeza (2014-06-30 03:11:49+00:00)
Title: Automatically strip newlines from Headers.

This makes it easier to avoid unexpected BadHeaderErrors caused by
having multiline subject or from_email.

I understand that this feature may be a little controversial, because it is doing something not quite expected in the background, but I think that it is necessary if we are going to encourage this pattern:

```python
class MyEmail(BasicEmail):
def get_subject(self):
return "{event} is coming up soon!".format(event=self.event.title)
```

Seeing as `event.title` is user input, it is possible that it contains newlines and would cause a 500.