You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, the aiosmtplib only accepts email body as string or bytes. It means that the mail should be completly loaded in memory before begining to send it.
With asyncio, it is very easy to work with streams (generated on the fly, read from files, pipes, sockets, etc). Moreover, if we want to send more that a few emails, we should either send them sequentially or load all of them in memory. In either case, we loose one of the feature of async programmming.
It would be nice to support email bodies as something else than just static buffers (string or bytes). Have a look at the aiohttp multipart module (http://aiohttp.readthedocs.io/en/stable/multipart.html). It enables to build a MIME Multipart body by attaching string, bytes, but also HTTP Responses, streams, etc. The content is serialized on the fly when using the object, and can be streamed to a socket or the standard output.
It would be nice to allow a streamable object as a message body, allowing not to load the content completly into memory while sending it.
The text was updated successfully, but these errors were encountered:
Today, the aiosmtplib only accepts email body as string or bytes. It means that the mail should be completly loaded in memory before begining to send it.
With asyncio, it is very easy to work with streams (generated on the fly, read from files, pipes, sockets, etc). Moreover, if we want to send more that a few emails, we should either send them sequentially or load all of them in memory. In either case, we loose one of the feature of async programmming.
It would be nice to support email bodies as something else than just static buffers (string or bytes). Have a look at the aiohttp multipart module (http://aiohttp.readthedocs.io/en/stable/multipart.html). It enables to build a MIME Multipart body by attaching string, bytes, but also HTTP Responses, streams, etc. The content is serialized on the fly when using the object, and can be streamed to a socket or the standard output.
It would be nice to allow a streamable object as a message body, allowing not to load the content completly into memory while sending it.
The text was updated successfully, but these errors were encountered: