Closed dant4z closed 7 years ago
This is weird, it is tested. Could you show how you used the imaplib append method ?
import asyncio
from aioimaplib import aioimaplib
import email.message
import logging
logging.basicConfig(level=logging.DEBUG)
addr = 'imap.gmail.com'
login = 'xxx@gmail.com'
password = 'xxx'
async def test():
imap = aioimaplib.IMAP4_SSL(addr, 993, timeout=60)
await imap.wait_hello_from_server()
await imap.login(login, password)
msg = email.message.EmailMessage()
msg.set_unixfrom('pymotw')
msg['From'] = login
msg['To'] = login
msg.set_content(b'test', 'text', 'plain')
await imap.append(bytes(msg))
loop = asyncio.get_event_loop()
loop.run_until_complete(test())
Log:
DEBUG:aioimaplib.aioimaplib:state -> AUTH
DEBUG:aioimaplib.aioimaplib:Sending : b'DOBN2 APPEND INBOX {143}\r\n'
DEBUG:asyncio:poll 59998.067 ms took 20.075 ms: 1 events
DEBUG:aioimaplib.aioimaplib:Received : b'+ go ahead\r\n'
DEBUG:aioimaplib.aioimaplib:continuation line appended to pending sync command DOBN2 APPEND INBOX {143} : + go ahead
INFO:asyncio:poll 59977.141 ms took 59977.208 ms: timeout
What i'm doing wrong?
I'm trying to reproduce, it seems that the mail data is never sent.
We are waiting 'literal data' in the server continuation line and it sends 'go ahead'.
Thank you for your bug report.
I'm fixing this.
Could you tell me if the commit fae66fd fixes your issue ? (it should) I released a 0.7.12 version that should fix this. I close the issue, you can reopen it if it does not work
Yes, now it works, thanks!
Hi, i have some troubles with APPEND command. It receives message that server ready to receive literal data and do nothing. This is part of asyncio debug log: