0

I am trying to use send_mail from Django Documentation:

send_mail('Subject here', 'Here is the message.', '[email protected]',
['[email protected]'], fail_silently=False)

I am using the real e-mail address. However I get this error:

send_mail() takes exactly 1 non-keyword argument (4 given)

What am I doing wrong? Thanks

1 Answer 1

1

Your function call has correct arguments according to Django's docs. send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None, connection=None)
Are you sure you don't have another function named send_mail in your file?

Sign up to request clarification or add additional context in comments.

1 Comment

Oh I got it! I shouldn't have named the view show_file. Thanks mate!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.