0
我有这个在我的setting.py
文件:与Gmail的SMTP发送电子邮件
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'Pass'
我要发送电子邮件从一个模板发布的目的地:
from django.core.mail.message import EmailMessage
destinations = request.POST['destinations'] #this return string with 2 emails ('[email protected]; [email protected]')
EmailMessage(subject, core, to=[destinations]).send()
它发送电子邮件只是第一封邮件而不是为了别人! 是否有任何操作使所有发布的电子邮件都能正常工作?