【发布时间】:2012-03-06 02:00:11
【问题描述】:
我正在尝试在 django 1.3、python 2.6 中创建联系表单。
出现以下错误的原因是什么?
错误:
SMTPRecipientsRefused at /contact/
{'test@test.megiteam.pl': (553, '5.7.1 <randomacc@hotmail.com>: Sender address
rejected: not owned by user test@test.megiteam.pl')}
我的设置.py:
EMAIL_HOST = 'test.megiteam.pl'
EMAIL_HOST_USER = 'test@test.megiteam.pl'
EMAIL_HOST_PASSWORD = '###'
DEFAULT_FROM_EMAIL = 'test@test.megiteam.pl'
SERVER_EMAIL = 'test@test.megiteam.pl'
EMAIL_USE_TLS = True
编辑:如果任何其他人关注 djangobook,这就是导致它的部分:
send_mail(
request.POST['subject'],
request.POST['message'],
request.POST.get('email', 'noreply@example.com'), #get rid of 'email'
['siteowner@example.com'],
【问题讨论】:
标签: python django smtp sendmail