Did I find the right examples for you? yes no

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)
Attach a file to this message.

:param name: Path to the file to attach if data is None, or the name
             of the file if the ``data`` argument is given
:param data: Contents of the file to attach, or None if the data is to
             be read from the file pointed to by the ``name`` argument
:type data: bytes or a file-like object
:param maintype: First part of the MIME type of the file -- will be
                 automatically guessed if not given
:param subtype: Second part of the MIME type of the file -- will be(more...)

src/b/a/baruwa-2.0.1/baruwa/commands/quarantinereport.py   baruwa(Download)
                email.plain = text
                email.rich = html
                email.attach('logo.png',
                            data=logo,
                            maintype='image',

src/b/a/baruwa2-HEAD/baruwa/commands/quarantinereport.py   baruwa2(Download)
                email.plain = text
                email.rich = html
                email.attach('logo.png',
                            data=logo,
                            maintype='image',

src/b/a/baruwa-2.0.1/baruwa/commands/pdfreportsng.py   baruwa(Download)
                        subject=_('Baruwa usage report'))
        email.plain = text
        email.attach('baruwa-reports.pdf',
                    data=pdf_file,
                    maintype='application',
                            subject=_('Baruwa usage report'))
            email.plain = text
            email.attach('baruwa-reports.pdf',
                        data=pdf_file,
                        maintype='application',

src/b/a/baruwa2-HEAD/baruwa/commands/pdfreportsng.py   baruwa2(Download)
                        subject=_('Baruwa usage report'))
        email.plain = text
        email.attach('baruwa-reports.pdf',
                    data=pdf_file,
                    maintype='application',
                            subject=_('Baruwa usage report'))
            email.plain = text
            email.attach('baruwa-reports.pdf',
                        data=pdf_file,
                        maintype='application',

src/b/a/baruwa-2.0.1/baruwa/commands/pdfreport.py   baruwa(Download)
                email.plain = text
                pdf_file = base64.b64encode(pdfcreator.build())
                email.attach('baruwa-reports.pdf',
                            data=pdf_file,
                            maintype='application',

src/b/a/baruwa2-HEAD/baruwa/commands/pdfreport.py   baruwa2(Download)
                email.plain = text
                pdf_file = pdfcreator.build()
                email.attach('baruwa-reports.pdf',
                            data=pdf_file,
                            maintype='application',

src/p/y/pymassmailer-1.1/pymassmailer/__init__.py   pymassmailer(Download)
                filename = os.path.basename(f)
                #part.add_header('Content-Disposition', 'attachment; filename="%s"' % filename)
                message.attach(filename, data=f)
 
        if template: