aioyagmail icon indicating copy to clipboard operation
aioyagmail copied to clipboard

M1 芯片无法正常发送邮件

Open Yingqingshan opened this issue 2 years ago • 4 comments

Mac 电脑M1 芯片无法正常发送邮件

Yingqingshan avatar Mar 15 '22 06:03 Yingqingshan

Without sharing any errors it is tough to help out though. Also I don't have an M1 so tough to help myself...

kootenpv avatar Mar 15 '22 11:03 kootenpv

from aioyagmail import AIOSMTP
from config import configs


async def send_email(email: str, subject: str, content: str):
    async with AIOSMTP(
            user=configs.EMAIL_HOST_USER,
            password=configs.EMAIL_HOST_PASSWORD,
            host=configs.EMAIL_HOST,
            port=configs.EMAIL_PORT,
    ) as yag:
        try:
            res = await yag.send(to=email, subject=subject, contents=content)
            print(res)
            return True
        except:
            return False


if __name__ == '__main__':
    async def register():
        try:
            print('333333333333333')
            result = await send_email("[email protected]", '123', '123')
        except:
            print('123')

    import asyncio
    loop = asyncio.get_event_loop()
    loop.run_until_complete(register())
    loop.close()


Yingqingshan avatar Mar 15 '22 14:03 Yingqingshan

There is no error on Macbook with M1 chip

Yingqingshan avatar Mar 15 '22 14:03 Yingqingshan

So what is the problem?

kootenpv avatar Mar 16 '22 14:03 kootenpv