Answer the question
In order to leave comments, you need to log in
How to get rid of krakozyabry in the "From" field, if the mailing address is Cyrillic, and the letter is sent by the php mail () function?
Actually, the whole question is in the subject. I use the application form on the Cyrillic domain. I send a letter with the php mail () function, and in the "from" field I see not the normal address [email protected], but question marks.
joxi.ru/LmGpoDjsNO1e2l
The encodings are configured correctly, utf-8 is specified in the header, the file is saved in utf-8 - there are no conflicts in this regard.
Can anyone come across?
Answer the question
In order to leave comments, you need to log in
the problem is solved in an interesting way: instead of the real name of the site written in Cyrillic, you need to use its punycode like xn--90azcerm.xn--p1ai
thus, when sending a letter with the mail() function, specify [email protected] in the sender parameter .xn--p1ai - the message arrives in the correct format, the "From" field contains a Cyrillic address.
But the question is different. For example, if we look at a letter in the mail.ru web interface, then in the list of letters the address is shown as is (without conversion to Cyrillic) [email protected], but when we open the letter, it is already there with conversion. I think this is a mail.ru bug, I haven't tested it on other mail services yet. But now another question - an aesthetic one - you need to somehow add the sender's name so that the list of letters shows not a bare address, but some arbitrary name ... Well, I'll google it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question