thank you!! Get Outlook for Android<https://aka.ms/AAb9ysg> ________________________________ From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf of Steven Lizhi <nice.li...@gmail.com> Sent: Wednesday, June 14, 2023 9:17:21 PM To: django-users@googlegroups.com <django-users@googlegroups.com> Subject: Re: Undelivered Mail Returned to Sender
Maybe you can use email cc param to send more email users. On Wed, Jun 14, 2023 at 8:19 PM Precious Imoniakemu <preciousimoniak...@gmail.com<mailto:preciousimoniak...@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 supp...@domainname.com<mailto:supp...@domainname.com> for any enquiry.' from_email = settings.EMAIL_HOST_USER to_email = order.email # Convert invoice_html to a File object invoice_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_USER to_email_ = 'ad...@domainname.com<mailto:ad...@domainname.com>' notice = EmailMessage(subject_, message_, from_email_, [to_email_]) notice.attach( 'invoice.pdf', invoice_file.getvalue(), 'application/pdf') notice.send() EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = os.getenv('EMAIL_HOST') #mail.privateemail.com<http://mail.privateemail.com> EMAIL_PORT = os.getenv('EMAIL_PORT') #465 EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER') EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD') EMAIL_USE_TLS = False EMAIL_USE_SSL = True 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. I'm sorry to have to inform you that your message could not be 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@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<https://groups.google.com/d/msgid/django-users/d77e903b-b210-43b0-9315-49abf082c60bn%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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<mailto:django-users+unsubscr...@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<https://groups.google.com/d/msgid/django-users/CAO_rqR5qbU%3Dwu6LSi8B89DYx04i_G%2BRUjA7T5VGE6TuxY9rMhQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- 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/DB9P193MB1596B08F0686C3D3182C14BAF458A%40DB9P193MB1596.EURP193.PROD.OUTLOOK.COM.