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

Why EmailMultiAlternatives Not Sending Email?

I'm trying to send a message to an email address with a pdf attachment. The letter doesn't come on mail. What's wrong in my code, please tell me? base_path = 'http://127.0.0.1:8000/' t = render_to_string( 'pdf_template_nds.html', { …
Ekzo
  • 103
  • 1
  • 9
0
votes
0 answers

Sending An Email Attachment In Django (Production)

I am wanting to add an attachment to an email. I am running this on a production server (I can do this in development). I have successfully stored my static files in static_files using whitenoise and they display correctly on the page. I am trying…
horse
  • 479
  • 7
  • 25
0
votes
2 answers

'Authentication Unsuccessful' When Trying To Send Email Through Django

I've been trying to send emails using my Outlook email through Django but have been getting a variety of error messages, including (535, b'5.7.3 Authentication unsuccessful [SYBPR01CA0102.ausprd01.prod.outlook.com]') Apparently I need to allow SMTP…
horse
  • 479
  • 7
  • 25
0
votes
1 answer

Why Django send email function is sending email twice?

I have Used Django EmailMessage function . Here is views.py file. def send_bill_mail(request): context_dict={ "name": "abc" } html_message = render_to_string('home/email_templates/bill_generation.html',…
0
votes
0 answers

django email not sending ( using form )

from django.http import HttpResponse, HttpResponseRedirect from .forms import Contact from django.core.mail import send_mail def contact(response): if response.method=="POST": form= Contact(response.POST) if form.is_valid(): …
Nafiyad
  • 46
  • 1
  • 8
0
votes
1 answer

Send email after returning response to user in django

I want to send verification email to new users. But because of slow connection it takes a long time to send an email and user will see a CONNECTION TIMED OUT error. I want to return the response to user and after that send the email. I already tried…
mhn2
  • 119
  • 9
0
votes
0 answers

Django Email Backend Failing when DEBUG = False

Has anyone experienced this issue where when DEBUG = True your applications can't send emails? I'm trying to set up a password reset email and a contact form and both work fine in development and in production as long as DEBUG = False, but as soon…
Stephen
  • 133
  • 1
  • 9
0
votes
1 answer

Django Admin send email upon new entry or update on models

Would like to ask for help on how to send an email. So I have basic tracking application for a logistics app. When I add a new entry(name,email,phone number,tracking number,cargo received date..) in my database in django admin or update the database…
jpdpueyo
  • 3
  • 3
0
votes
0 answers

Django 3.0: Unable to use password_reset but able to send emails from views

I am unable to use django's default password_reset. It isn't sending emails. I have tried many many configurations but nothing is working. I know my settings are right, As I am fully able to send emails in views.py Following Code is absolutely…
Newbie
  • 53
  • 6
0
votes
0 answers

Django Email issues while sending to others

@ Code is in settings.py and removed the line in the settings.py EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend EMAIL_HOST= 'smtp.gmail.com' EMAIL_HOST_USER= 'xxx@gmail.com' EMAIL_HOST_PASSWORD='app-specific-pass-word' EMAIL_USE_TLS=…
0
votes
1 answer

django - sending email with gmail failure

I'm trying to implement an automatic email sending system with gmail on my django app. This is my view: from .forms import EmailPostForm from django.core.mail import send_mail def post_share(request, post_id): #retrive post by # post =…
0
votes
1 answer

How to send an email using a html template that contains javascript django?

I have an email template that is rendering certain datetime strings from django. I would like to render this time based on the user's timezone. To solve this I have opted to use momentjs however once, it seems the javascript in the template is not…
oma0256
  • 103
  • 4
  • 11
0
votes
1 answer

How to display html content of an EmailMultiAlternatives mail object

When sending EmailMultiAlternaitves: from django.core.mail import EmailMultiAlternatives subject, from_email, to = 'hello', 'from@example.com', 'to@example.com' text_content = 'This is an important message.' html_content = '

This is an…

alias51
  • 8,178
  • 22
  • 94
  • 166
0
votes
1 answer

Django EmailMessage add attachement to an email

In my python django project i use this two method for send html email: def send_html_email(to_list, subject, template_name, context, sender=settings.DEFAULT_FROM_EMAIL): msg_html = render_to_string(template_name, context) msg =…
Manuel Santi
  • 1,106
  • 17
  • 46
0
votes
0 answers

Django file does not exist error when trying to attach pdf in email based on conditions

I am trying to send a 2 pdf files as attachment,1 generated by xhtml2pdf and another which is already present in the app directory of my django project, based on a condition. I am able to send the generated file and 1 file but getting error " File…