Hi guys, I am using Celery and Eventlet to facilitate a task which sends emails. I am using the following code: @task def order_created(order_id): """ Task to send an e-mail notification when an order is successfully created. """ order = Order.objects.get(id=order_id) subject = 'Order nr. {}'.format(order.id) message = 'Dear {},\n\nYou have successfully placed an order.\ Your order id is {}.'.format(order.first_name, order.id) mail_sent = send_mail(subject,message,settings.EMAIL_HOST_USER,[order.email],fail_silently=False)
return mail_sent I get the following error TypeError: wrap_socket() got an unexpected keyword argument '_context' Can anyone assist? Celery 4.4.2 Eventlet 0.25.2 Django 2.2.12 Sent from Mail for Windows 10 You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5eac332b.1c69fb81.a319b.4b21%40mx.google.com. |
- Trying to send mails from website Divash Singh
- Re: Trying to send mails from website VenkataSivaRamiReddy