title: Django ical attachment causes 'HttpResponse' object has no attribute 'encode'
body: <p>I am getting <code>AttributeError: 'HttpResponse' object has no attribute 'encode'</code> when I attach a ics calender invite to an email to send in Django. This is only if I attached the ical invite, if I don't atttach it everything is fine. </p>
  
  <p>I am not sure why it's looking for a encode attribute on the HttpResponse object or what to do about it.</p>
  
  <pre><code>def email_invite(ics_form, user_assigned):
      subject = 'You Have Been Assigned Schuduled Maintance/Calendar invite'
      from_address = 'foo@no-reply.com'
      body = "This is a invite"
      recip = [user_assigned]
      email = EmailMessage(subject, body, from_address, recip)
      email.attach(ics_form['Filename'], ics_form, 'text/calendar')
      email.send()
  
  
  def create_ics(data):
      start1 = data['date_due']
      utc = vobject.icalendar.utc
      start2 = datetime.datetime(start1.year, start1.month, start1.day, tzinfo = utc)
      start3 = data['action']
      cal = vobject.iCalendar()
      cal.add('method').value = 'PUBLISH'
      vevent = cal.add('vevent')
      vevent.add('dtstart').value = start2
      vevent.add('dtend').value = start2
      vevent.add('dtstamp').value = datetime.datetime.now()
      vevent.add('summary').value = data['action'].name
      response = HttpResponse(cal.serialize(), content_type='text/calendar')
      response['Filename'] = 'filename.ics'
      response['Content-Disposition'] = 'attachment; filename=filename.ics'
      return response
  
   File "/home/one/.virtualenvs/chronos/local/lib/python2.7/site-packages/django/core/mail/message.py", line 280, in _create_message
      return self._create_attachments(msg)
    File "/home/one/.virtualenvs/chronos/local/lib/python2.7/site-packages/django/core/mail/message.py", line 293, in _create_attachments
      msg.attach(self._create_attachment(*attachment))
    File "/home/one/.virtualenvs/chronos/local/lib/python2.7/site-packages/django/core/mail/message.py", line 320, in _create_attachment
      attachment = self._create_mime_attachment(content, mimetype)
    File "/home/one/.virtualenvs/chronos/local/lib/python2.7/site-packages/django/core/mail/message.py", line 303, in _create_mime_attachment
      attachment = SafeMIMEText(content, subtype, encoding)
    File "/home/one/.virtualenvs/chronos/local/lib/python2.7/site-packages/django/core/mail/message.py", line 126, in __init__
      MIMEText.__init__(self, text, subtype, charset)
    File "/usr/lib/python2.7/email/mime/text.py", line 30, in __init__
      self.set_payload(_text, _charset)
    File "/usr/lib/python2.7/email/message.py", line 226, in set_payload
      self.set_charset(charset)
    File "/usr/lib/python2.7/email/message.py", line 268, in set_charset
      cte(self)
    File "/usr/lib/python2.7/email/encoders.py", line 73, in encode_7or8bit
      orig.encode('ascii')
  AttributeError: 'HttpResponse' object has no attribute 'encode'
  [15/Jan/2014 08:30:36] "POST /modify/2/ HTTP/1.1" 500 167107
  Not Found: /favicon.ico
  </code></pre>