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

All Samples(22)  |  Call(20)  |  Derive(0)  |  Import(2)

src/i/n/inbox-HEAD/src/inbox/server/sendmail/message.py   inbox(Download)
 
    # Create a multipart/alternative message
    msg = mime.create.multipart('alternative')
    msg.append(
        mime.create.text('text', plaintext),
    if attachments:
        text_msg = msg
        msg = mime.create.multipart('mixed')
 
        # The first part is the multipart/alternative text part

src/f/l/flanker-0.4.14/tests/mime/message/create_test.py   flanker(Download)
def create_multipart_simple_test():
    message = create.multipart("mixed")
    message.append(
        create.text("plain", "Hello"),
        create.text("html", "<html>Hello</html>"))
def create_multipart_with_attachment_test():
    message = create.multipart("mixed")
    filename = u"Мейлган картиночка картиночечка с длинным  именем и пробельчиками"
    message.append(
        create.text("plain", "Hello"),
def create_multipart_with_text_non_unicode_attachment_test():
    """Make sure we encode text attachment in base64
    """
    message = create.multipart("mixed")
    filename = "text-attachment.txt"
def create_multipart_with_text_non_unicode_attachment_preserve_encoding_test():
    """Make sure we encode text attachment in base64
    and also preserve charset information
    """
    message = create.multipart("mixed")
def create_multipart_nested_test():
    message = create.multipart("mixed")
    nested = create.multipart("alternative")
    nested.append(
        create.text("plain", u"Саша с уралмаша"),

src/f/l/flanker-HEAD/tests/mime/message/create_test.py   flanker(Download)
def create_multipart_simple_test():
    message = create.multipart("mixed")
    message.append(
        create.text("plain", "Hello"),
        create.text("html", "<html>Hello</html>"))
def create_multipart_with_attachment_test():
    message = create.multipart("mixed")
    filename = u"Мейлган картиночка картиночечка с длинным  именем и пробельчиками"
    message.append(
        create.text("plain", "Hello"),
def create_multipart_with_text_non_unicode_attachment_test():
    """Make sure we encode text attachment in base64
    """
    message = create.multipart("mixed")
    filename = "text-attachment.txt"
def create_multipart_with_text_non_unicode_attachment_preserve_encoding_test():
    """Make sure we encode text attachment in base64
    and also preserve charset information
    """
    message = create.multipart("mixed")
def create_multipart_nested_test():
    message = create.multipart("mixed")
    nested = create.multipart("alternative")
    nested.append(
        create.text("plain", u"Саша с уралмаша"),

src/f/l/flanker-0.4.14/tests/mime/message/part_test.py   flanker(Download)
# coding:utf-8
import re
from nose.tools import *
from mock import *
from flanker.mime.create import multipart, text
    text1 = 'Hey there'
    text2 = 'I am a part number two!!!'
    message = multipart('alternative')
    message.append(
        text('plain', text1),

src/f/l/flanker-HEAD/tests/mime/message/part_test.py   flanker(Download)
# coding:utf-8
import re
from nose.tools import *
from mock import *
from flanker.mime.create import multipart, text
    text1 = 'Hey there'
    text2 = 'I am a part number two!!!'
    message = multipart('alternative')
    message.append(
        text('plain', text1),