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

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)
Figures out all the required steps to finally craft the
message you need and return it.  The resulting message
is also available as a self.base attribute.

What is returned is a Python email API message you can
use with those APIs.  The self.base attribute is the raw
lamson.encoding.MailBase.

src/l/a/lamson-1.3.4/examples/librelist/tests/model/mailinglist_tests.py   lamson(Download)
    sample['message-id'] = '123545666'
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 3)
 
                          Body="The body as one attachment.")
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 1)
    assert_equal(im.get_payload(), sample.Body)

src/l/a/lamson-HEAD/examples/librelist/tests/model/mailinglist_tests.py   lamson(Download)
    sample['message-id'] = '123545666'
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 3)
 
                          Body="The body as one attachment.")
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 1)
    assert_equal(im.get_payload(), sample.Body)

src/s/a/salmon-mail-1/examples/librelist/tests/model/mailinglist_tests.py   salmon-mail(Download)
    sample['message-id'] = '123545666'
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 3)
 
                          Body="The body as one attachment.")
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 1)
    assert_equal(im.get_payload(), sample.Body)

src/m/i/mixfaster-HEAD/app/handlers/remailer.py   mixfaster(Download)
                                Subject = "Statistics for the " + getRemailerConfig('remailershortname') + " remailer",
                                Body = stats)
            relay.deliver(mail.to_message())
    elif subject == 'remailer-conf':
        logging.debug("Processing a remailer-conf request..." + messageId)
                                Subject = "Capabilities of the " + getRemailerConfig('remailershortname') + " remailer",
                                Body = conf)
            relay.deliver(mail.to_message())
    elif subject == 'remailer-adminkey':
        logging.debug("Processing a remailer-adminkey request..." + messageId)
                                Subject = "Remailer key for " + getRemailerConfig('remailershortname'),
                                Body = keys)
            relay.deliver(mail.to_message())
    else:
        logging.debug("Processing a Message..." + messageId)
                                    Subject = mixmsg.deliverySubject(),
                                    Body = mixmsg.deliveryBody())
                relay.deliver(mail.to_message())
                logging.debug("Delivering an Intermediate Hop Message..." + messageId)
            elif mixmsg.PacketType == MixPacketType.FinalHop:
                            for h, v in mixmsg.deliveryHeaders():
                                mail[h] = v
                            relay.deliver(mail.to_message())
            elif mixmsg.PacketType == MixPacketType.DummyMessage:
                logging.debug("Ignoring a Dummy Message...")

src/l/i/librelist-HEAD/tests/model/mailinglist_tests.py   librelist(Download)
    sample['message-id'] = '123545666'
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 3)
 
                          Body="The body as one attachment.")
 
    im = sample.to_message()
    assert_equal(len([x for x in im.walk()]), 1)
    assert_equal(im.get_payload(), sample.Body)

src/l/a/lamson-HEAD/tests/lamson_tests/message_tests.py   lamson(Download)
    assert sample.multipart
 
    msg = sample.to_message()
    assert_equal(len(msg.get_payload()), 2)
 
    sample.attach(data=readme_data, filename="./README.md", content_type="text/plain")
 
    msg = sample.to_message()
    assert_equal(len(msg.get_payload()), 2)
    sample.clear()
 
    sample.attach(data=readme_data, content_type="text/plain")
    msg = sample.to_message()
    outmsg.attach_all_parts(inmsg)
 
    result = outmsg.to_message()
 
    for part in result.walk():

src/l/a/lamson-1.3.4/tests/lamson_tests/message_tests.py   lamson(Download)
    assert sample.multipart
 
    msg = sample.to_message()
    assert_equal(len(msg.get_payload()), 2)
 
    sample.attach(data=readme_data, filename="./README.md", content_type="text/plain")
 
    msg = sample.to_message()
    assert_equal(len(msg.get_payload()), 2)
    sample.clear()
 
    sample.attach(data=readme_data, content_type="text/plain")
    msg = sample.to_message()
    outmsg.attach_all_parts(inmsg)
 
    result = outmsg.to_message()
 
    for part in result.walk():