当前位置: 首页>>代码示例>>Python>>正文


Python EmailMessage.get_recipients方法代码示例

本文整理汇总了Python中mailshake.EmailMessage.get_recipients方法的典型用法代码示例。如果您正苦于以下问题:Python EmailMessage.get_recipients方法的具体用法?Python EmailMessage.get_recipients怎么用?Python EmailMessage.get_recipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mailshake.EmailMessage的用法示例。


在下文中一共展示了EmailMessage.get_recipients方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_cc

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_cc():
    email = EmailMessage('Subject', 'Content', '[email protected]',
        '[email protected]', cc='[email protected]')
    message = email.message()

    assert message['Cc'] == '[email protected]'
    assert email.get_recipients() == ['[email protected]', '[email protected]']
开发者ID:andrewnelder,项目名称:MailShake,代码行数:9,代码来源:test_message.py

示例2: test_multiple_bcc

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_multiple_bcc():
    email = EmailMessage('Subject', 'Content', '[email protected]',
                         bcc=['[email protected]', '[email protected]'])
    message = email.render()

    assert not message['To']
    assert not message['Cc']
    assert not message['Bcc']  # as it should
    assert email.get_recipients() == ['[email protected]', '[email protected]']
开发者ID:jpscaletti,项目名称:MailShake,代码行数:11,代码来源:test_message.py

示例3: test_cc

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_cc():
    email = EmailMessage('Subject', 'Content', '[email protected]',
                         cc='[email protected]')
    message = email.render()

    assert message['Cc'] == '[email protected]'
    assert not message['To']
    assert not message['Bcc']
    assert email.get_recipients() == ['[email protected]']
开发者ID:jpscaletti,项目名称:MailShake,代码行数:11,代码来源:test_message.py

示例4: test_multiple_cc_and_to

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_multiple_cc_and_to():
    email = EmailMessage('Subject', 'Content', '[email protected]',
        to=['[email protected]', '[email protected]'],
        cc=['[email protected]', '[email protected]'])
    message = email.message()

    assert message['Cc'] == '[email protected], [email protected]'
    assert email.get_recipients() == ['[email protected]', '[email protected]',
        '[email protected]', '[email protected]']
开发者ID:andrewnelder,项目名称:MailShake,代码行数:11,代码来源:test_message.py

示例5: test_multiple_cc

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_multiple_cc():
    email = EmailMessage('Subject', 'Content', '[email protected]',
                         cc=['[email protected]', '[email protected]'])
    message = email.render()

    print(message['Cc'])
    assert message['Cc'] == '[email protected], [email protected]'
    assert not message['To']
    assert not message['Bcc']
    assert email.get_recipients() == ['[email protected]', '[email protected]']
开发者ID:jpscaletti,项目名称:MailShake,代码行数:12,代码来源:test_message.py

示例6: test_multiple_replyto

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_multiple_replyto():
    email = EmailMessage('Subject', 'Content', '[email protected]',
                         reply_to=['[email protected]', '[email protected]'])
    message = email.render()

    assert message['Reply-To'] == '[email protected], [email protected]'
    assert not message['To']
    assert not message['Cc']
    assert not message['Bcc']  # as it should
    assert email.get_recipients() == []
开发者ID:jpscaletti,项目名称:MailShake,代码行数:12,代码来源:test_message.py

示例7: test_recipients_as_tuple

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_recipients_as_tuple():
    email = EmailMessage('Subject', 'Content', '[email protected]', 
        to=('[email protected]', '[email protected]'),
        cc=('[email protected]', '[email protected]'),
        bcc=('[email protected]',))
    message = email.message()

    assert message['Cc'] == '[email protected], [email protected]'
    assert email.get_recipients() == ['[email protected]', '[email protected]',
        '[email protected]', '[email protected]', '[email protected]']
开发者ID:andrewnelder,项目名称:MailShake,代码行数:12,代码来源:test_message.py

示例8: test_multiple_to_cc_bcc

# 需要导入模块: from mailshake import EmailMessage [as 别名]
# 或者: from mailshake.EmailMessage import get_recipients [as 别名]
def test_multiple_to_cc_bcc():
    email = EmailMessage('Subject', 'Content', '[email protected]',
                         to=['[email protected]', '[email protected]'],
                         cc=['[email protected]', '[email protected]'],
                         bcc=['[email protected]', '[email protected]'])
    message = email.render()

    assert message['To'] == '[email protected], [email protected]'
    assert message['Cc'] == '[email protected], [email protected]'
    assert message['Bcc'] == '[email protected], [email protected]'
    assert email.get_recipients() == [
        '[email protected]', '[email protected]',
        '[email protected]', '[email protected]',
        '[email protected]', '[email protected]',
    ]
开发者ID:alfredo,项目名称:MailShake,代码行数:17,代码来源:test_message.py


注:本文中的mailshake.EmailMessage.get_recipients方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。