是他做异步的正确方法调用Python中的功能?什么是发送邮件异步在Python/Django的正确方法是什么?
起始密码
pool = Pool(processes=4)
pool.apply_async(send_email, ['CONFIRM', email, auth_token, password, "", first_name])
功能
def send_email(flag, email, auth_token='', password='', shared_by='', name=''):
try :
send_mail('Greetings!', 'Hi '+str(name)+'\nThank you for checking us out!'
'Please click on the link below to activate your subscription.\n' + confirmation_link +
'\npassword : ' + password, '[email protected]', [email],
fail_silently=False)
except SMTPException as e:
print e
有我看了网上的文档?
是的,我有,但它严重并没有多大帮助。所以我在这里寻求帮助。
您已阅读在线文档,但您没有告诉我们您的工作有什么问题。 –
我想知道这是否是异步需要做的呢? – cafebabe1991
它在最上面的@ShangWang的问题 – cafebabe1991