The `attach_file` method is a part of the `EmailMultiAlternatives` class in the Django `core.mail` module. It is used to attach a file to an email as one of the alternative content types. This method allows for attaching files to be included in the email, such as images or documents, along with the ability to send the email in multiple formats, such as HTML or plain text.
Python EmailMultiAlternatives.attach_file - 59 examples found. These are the top rated real world Python examples of django.core.mail.EmailMultiAlternatives.attach_file extracted from open source projects. You can rate examples to help us improve the quality of examples.