This might be 3 years too late, but I had this same problem and the issue
was that my ADMINS setting wasn't a list or tuple:
ADMINS = (
('Admin', '[email protected]')
)
changed it to the following and mail_admins worked:
ADMINS = (
('Admin', '[email protected]'),
)
On Wednesday, June 17, 2009 1:00:13 PM UTC-7, ozgurisil wrote:
>
>
> Hello,
>
> When I try to send an e-mail via mail_admins method, I receive an
> SMTPDataError with the value: (503, '5.5.1 RCPT first. e9sm3788894muf.
> 32').
>
> Here is the code:
>
> def send_mail(self):
> from django.core.mail import mail_admins, send_mail
> mail_admins(self.cleaned_data['subject'],
> self.cleaned_data['body'],
> fail_silently=False)
>
> When I change the code and switch to the regular send_mail method
> using the same variables with the mail_admins method, the mail is sent
> successfully.
>
> def send_mail(self):
> from django.core.mail import mail_admins, send_mail
> send_mail(self.cleaned_data['subject'],
> self.cleaned_data['body'], settings.SERVER_EMAIL,
> settings.ADMINS, fail_silently=False)
>
> What can be the reason of this situation?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/lt5jkXExjpwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.