Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
A file attachment is a raw attachment with a disposition that
indicates the file name.

src/l/a/lamson-1.3.4/tests/lamson_tests/encoding_tests.py   lamson(Download)
def test_attach_file():
    mail = encoding.MailBase()
    png = open("tests/lamson.png").read()
    mail.attach_file("lamson.png", png, "image/png", "attachment")
    msg = encoding.to_message(mail)

src/l/a/lamson-HEAD/tests/lamson_tests/encoding_tests.py   lamson(Download)
def test_attach_file():
    mail = encoding.MailBase()
    png = open("tests/lamson.png").read()
    mail.attach_file("lamson.png", png, "image/png", "attachment")
    msg = encoding.to_message(mail)