Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
send mail is freezing
#1
Hi

I am trying to send an email but it is freezing and if i refresh the page everything is working except for the email part, it is not sent.

    from django.core.mail import EmailMessage
	from django.conf import settings
	from django.template.loader import render_to_string

	template = render_to_string('cart/email_template.html', {'name': request.user.profile.username})
	the_email = EmailMessage(

			'Thanks for your purchase!',
			template,
			settings.EMAIL_HOST_USER,
			[request.user.profile.email],

		)

	the_email.fail_silently = False
	the_email.content_subtype = 'html'
	the_email.send()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [flask] mail.send giving error SheeppOSU 2 2,878 May-31-2019, 09:31 PM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020