Re: Setting recipient name in EmailMultiAlternatives

2023-03-27 Thread Sharif Mehedi
I haven't read the documents myself that I am referring to here. But they should come as a help to you with your question.https://www.rfc-editor.org/rfc/rfc5322https://github.com/python/cpython/blob/main/Lib/email/_header_value_parser.py Try to follow the generalized rules when having some public

Re: Setting recipient name in EmailMultiAlternatives

2023-03-27 Thread Peter Benjamin Ani
I don't fully understand the error, can you describe it more please On Mon, 27 Mar 2023, 13:54 Sylvain, wrote: > Hello, > > I’m using the following code to send mails to my users, with their name > appearing in the `To` header: > > msg = EmailMultiAlternatives(subject=subject, body=body, > to=f"

Setting recipient name in EmailMultiAlternatives

2023-03-27 Thread Sylvain
Hello, I’m using the following code to send mails to my users, with their name appearing in the `To` header: msg = EmailMultiAlternatives(subject=subject, body=body, to=f"{user.get_full_name()} <{user.email}>") msg.send() It works fine but if you have a special character in your name (such as