Comments (6)
Though I'm not positive about this, my first suspicion is it might have to do with starting and stopping the loop between every call. I would recommend first moving all of your code that uses the smtp object into an async function and then passing the invocation of that function into loop.run_until_complete(my_async_function(smtp))
from aiosmtplib.
Hello, thanks for your quick response.
I have the same result with this code.
async def test(smtp):
for i in range(30):
msg = email.message_from_string(my_eml)
await smtp.send_message(msg)
sleep(0.5)
loop = asyncio.get_event_loop()
smtp = aiosmtplib.SMTP(hostname='gmail-smtp-in.l.google.com', port=25, loop=loop, use_tls=False)
loop.run_until_complete(smtp.connect())
loop.run_until_complete(smtp.starttls())
loop.run_until_complete(test(smtp))
smtp.close()
Have you an idea ?
from aiosmtplib.
I can't reproduce error so far (testing with smtp.gmail.com). It seems like the server is dropping the connection without sending a response, but that should raise SMTPServerDisconnected
.
One quick thing, for STARTTLS connections, typically the port is 587, not 25.
from aiosmtplib.
Yes, the server is dropping the connection without sending a response. I encountered this issue only with gmail. So, I will catch AttributeError exception. Thank for your help.
from aiosmtplib.
Going to reopen this as a reminder to myself to add a test case for it.
from aiosmtplib.
Can't reproduce this still. Closing.
from aiosmtplib.
Related Issues (20)
- CancelledError thrown when trying to send without authentication HOT 2
- Enabling UTF-8 for Authetication HOT 5
- 4 failing tests HOT 7
- add github issues url to bug reporting docs section HOT 1
- [Debian] Please include CHANGELOG.rst in your pypi releases. HOT 2
- Please support choice of outbound IP address HOT 1
- Suggestion: Support 'TLS optional' usage HOT 3
- Add testing section to docs HOT 2
- Timed out waiting for server ready message HOT 3
- Error trying to use the mail_options or rcpt_options arguments HOT 1
- Do not receive emails using Bcc, Cc headers HOT 2
- Custom DNS resolver HOT 1
- aiosmtplib is not working. [SSL: WRONG_VERSION_NUMBER] wrong version number HOT 1
- packaging issue: deployment of tests HOT 1
- Operation-level timeout HOT 4
- Gives AttributeError when calling with when HOT 2
- Support LMTP HOT 3
- client.connect() call hangs after server timeout HOT 8
- Proxy support HOT 1
- TIP: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiosmtplib.