Open Yingqingshan opened 2 years ago
Without sharing any errors it is tough to help out though. Also I don't have an M1 so tough to help myself...
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("462548187@qq.com", '123', '123')
except:
print('123')
import asyncio
loop = asyncio.get_event_loop()
loop.run_until_complete(register())
loop.close()
There is no error on Macbook with M1 chip
So what is the problem?
Mac 电脑M1 芯片无法正常发送邮件