Skip to main content

带有队列的异步邮件发送模块

Project description

baidu translate

带有队列的异步邮件发送模块

示例

import asyncio
from lzhasyncemailsender import AsyncEmailSender

async def main():
    sender = AsyncEmailSender('smtp.example.com', 587, 'you@example.com', 'yourpassword')
    await sender.send('target@example.com', 'Subject', '<h1>Hello World</h1>')  # 发送给一个邮箱地址
    await sender.send(['target1@example.com','target2@example.com'], 'Subject', '<h1>Hello World</h1>')  # 发送给一个邮箱地址列表
    await asyncio.sleep(10)
    await sender.stop()
    
asyncio.run(main())

"""

安装 - PyPI

pip install lzhasyncemailsender

API

Document

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lzhasyncemailsender-1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lzhasyncemailsender-1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file lzhasyncemailsender-1.1.tar.gz.

File metadata

  • Download URL: lzhasyncemailsender-1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for lzhasyncemailsender-1.1.tar.gz
Algorithm Hash digest
SHA256 dbc243414dbcb613713886e8a2b0d9972d0365cdbba4a0a0111910251b09ec83
MD5 782fa114753217a5f3ac7a245c5acb1f
BLAKE2b-256 bfea3c8813a46353a4043146c4f3acb4c843a72d5cb7f1478ed4734499225dc8

See more details on using hashes here.

File details

Details for the file lzhasyncemailsender-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lzhasyncemailsender-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5fdc83c5aff75c79cfe2b088e16441130ea182f13df628b1d3e097b397d1761
MD5 d3d2eb5c80411b7271265dc600571da0
BLAKE2b-256 7a0aa3b66c862a7003d0e2ad8814c05bbc0802aeae1eff31435e4050e2705a00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page