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.0.tar.gz (3.1 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.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lzhasyncemailsender-1.0.tar.gz
Algorithm Hash digest
SHA256 d232b15aa5766b71f912354a6502905789bee41f4e519c236bbc44276e158339
MD5 32459884c6c8ee854ba02d19a1e1150f
BLAKE2b-256 c0f8da793375851436096f40138a71676971bc8dc069e93ef275a53d1a56e9ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lzhasyncemailsender-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6678c6e7caa0ae3ea99da0f0f20dab470b18e518501299c5e01f09cc4f9f7e1c
MD5 2eb6e998f9102353827a26d53b1ab344
BLAKE2b-256 76982dafe06b1ff97b6fcf0c1f4fe257fa73f4ba374c4071598792807588db2d

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