Questions tagged [django-email]

django-email refers to questions about sending emails in your Django application

django-email refers to questions about sending emails in your Django application.

See documentation.

325 questions
0
votes
0 answers

i am getting error while sending email through django. i have following settings in my settings.py file . how can i resolve this problem?

@login_required(login_url="/login/") def api_view(request): if request.method == "POST": subs = str(request.POST.get("subs")).capitalize() subs = ast.literal_eval(subs) # javascript true to Python True user_name =…
athar
  • 31
  • 4
0
votes
0 answers

django admin Postoffice queued mails are not editable

I am working on two separate Django apps. We are sending mail in Django. Due to some mistakes in the mail, sometimes it is required to edit the queued mail. But for some reason, one of the apps allows editing the queued mail, whereas the other app…
Abhishek
  • 1
  • 3
0
votes
0 answers

(421, b'Service not available')

I have a simple method (send_activation_email) called from a view which handles user registration by extending default django user auth. It sends an activation email. Now I get the error: Please help me out guys Exception Type: SMTPConnectError …
0
votes
1 answer

Hello am getting error in django Email send

ConnectionRefusedError at /contact/ [WinError 10061] No connection could be made because the target machine actively refused it Program are running normally when i open this page this error are Seenenter image description here {% csrf_token…
0
votes
1 answer

How to mail a pdf file stored in the database in the media folder to a user -Django

I have a model that stores some pdf files. I want to mail a pdf file as an attachment when a user requests to do so. I tried a way to do it like this @api_view(['POST']) def send_pdf_to_user(request): id = request.data.get('id') …
0
votes
1 answer

django send mail on update password

I have a ChangePasswordView for my User: class ChangePasswordView(PasswordChangeView): form_class = ChangePasswordForm success_url = reverse_lazy('password_success') #success view def password_success(request): return render(request,…
0
votes
1 answer

Send Email: user.email_user vs send_mail

I'm trying to send a email for users. In one situation it sends, but in other didn't send. If I use 'email_user' it sends the email. 'user' is an autentificated user (built in with django). About 'send_mail' I know after reading the…
Sergo
  • 93
  • 3
  • 10
0
votes
1 answer

Django mass email - get single recipient address in every email template

I'm sending email in Django: ... recipient_list = ['first@recipient.com', 'second@recipient.com',] mail = EmailMessage('Subject', 'content body', [sender@email.com], recipient_list) mail.send() In the template I'm rendering I would like to extract…
0
votes
1 answer

Django email verification link goes to page not found

I am using conventional email code generation to verify email users. During development when I send the verification link to console and paste in browser it works fine but during production it says page not found.. Have tried all possible option no…
Iman
  • 25
  • 4
0
votes
1 answer

Django email backed error brings socket error on smtp but send to console successful

I tried to send email via django Email message for account mail verification. When I send email via to console it send the activation link successfully but when it comes to sending via smtp I get TypeError: getaddrinfo() argument 1 must be string or…
Iman
  • 25
  • 4
0
votes
1 answer

How can I send email using python with google workspace

I just signed up for the Google workspace business starter because of lots of recommendations from people, I would like to know how possible is it to send email via my backend API using Django, I've searched for it online but nothing comprehensive…
haysquare
  • 45
  • 1
  • 5
0
votes
1 answer

How to open a link if a function get called Django

I am trying to verified my user using email. It is all working fine but here I want to open a url when one of my api get called. After register I am sending them an email with link to activate account so link is one of my api which is a function I…
0
votes
2 answers

My email isn't sending with django, giving weird errors

This is my settings.py: EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = 'my_email' EMAIL_HOST_PASSWORD = 'my_password' This is the views.py…
Kovy Jacob
  • 489
  • 2
  • 16
0
votes
1 answer

Django causes error when I'm trying to send email. Error message: [Errno 61] Connection refused

I'm trying to send email from Django. My Django settings configurations are as follows: # SMTP Settings EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST = "smtp.gmail.com" EMAIL_HOST_USER = "my_email@gmail.com" # my email…
Fahad Md Kamal
  • 243
  • 6
  • 20
0
votes
1 answer

Is there a more faster and efficient ways to send email in django so that the user does not have to wait the entire time the page loads

I am making a website where a user registers to book an instructor for a certain period of time according to a plan he chooses. There are three plans from which a user can choose namely 7days, 14days and 21days. After registering, the user needs to…