Maybe you can use email cc param to send more email users.
On Wed, Jun 14, 2023 at 8:19 PM Precious Imoniakemu <preciousimoniakemu@gmail.com> wrote:
invoice_html = html2pdf('product/invoice.html', context)subject = 'Invoice for your order'message = 'Please find attached the invoice for your order. This is a no reply mail but you can contact us through support@domainname.com for any enquiry.'from_email = settings.EMAIL_HOST_USERto_email = order.email# Convert invoice_html to a File objectinvoice_file = BytesIO(invoice_html)email = EmailMessage(subject, message, from_email, [to_email])email.attach('invoice.pdf', invoice_file.getvalue(), 'application/pdf')email.send()subject_ = 'Notice for an order'message_ = f'Please find notice information for { order.full_name } new order.'from_email_ = settings.EMAIL_HOST_USERnotice = EmailMessage(subject_, message_,from_email_, [to_email_])notice.attach('invoice.pdf', invoice_file.getvalue(), 'application/pdf')notice.send()I tried sending mail to from my privateemail i got from namecheap to gmail but it gives thr content below: This is the mail system at host mailout-pe-b.jellyfish.systems.EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'EMAIL_PORT = os.getenv('EMAIL_PORT') #465EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER')EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD')EMAIL_USE_TLS = FalseEMAIL_USE_SSL = TrueI'm sorry to have to inform you that your message could notbe delivered to one or more recipients.--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d77e903b-b210-43b0-9315-49abf082c60bn%40googlegroups.com.
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO_rqR5qbU%3Dwu6LSi8B89DYx04i_G%2BRUjA7T5VGE6TuxY9rMhQ%40mail.gmail.com.
No comments:
Post a Comment