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()
它發送電子郵件只是第一封郵件而不是爲了別人! 是否有任何操作使所有發佈的電子郵件都能正常工作?