diff --git a/django/core/mail/message.py b/django/core/mail/message.py
index e8d209c..53b2d4b 100644
--- a/django/core/mail/message.py
+++ b/django/core/mail/message.py
@@ -309,7 +309,11 @@ class EmailMessage(object):
     def attach_file(self, path, mimetype=None):
         """Attaches a file from the filesystem."""
         filename = os.path.basename(path)
-        with open(path, 'rb') as f:
+        if not mimetype:
+            mimetype, _ = mimetypes.guess_type(filename)
+        basetype, subtype = mimetype.split('/')
+        readmode = 'r' if basetype == 'text' else 'rb'
+        with open(path, readmode) as f:
             content = f.read()
         self.attach(filename, content, mimetype)
 