Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 芯片无法正常发送邮件 #1

Open
Yingqingshan opened this issue Mar 15, 2022 · 4 comments
Open

M1 芯片无法正常发送邮件 #1

Yingqingshan opened this issue Mar 15, 2022 · 4 comments

Comments

@Yingqingshan
Copy link

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

@kootenpv
Copy link
Owner

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

@Yingqingshan
Copy link
Author

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
Copy link
Author

There is no error on Macbook with M1 chip

@kootenpv
Copy link
Owner

So what is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants