A
A
Andrey Ivanov2019-12-24 21:54:47
Character encoding
Andrey Ivanov, 2019-12-24 21:54:47

PHP PHPMailer DKIM signature and encoding. Signature verification fails, what could be the reason?

Letters are sent, everything comes. PHPMailer via sendmail. PHPMailer for signing purposes only.
The problem is actually in the DKIM signature.
If there is at least one Cyrillic character in the body of the letter, in the Body, then the signature does not pass the verification.
If just Latin letters, then everything is OK, the signature is good.
Nobody faced this problem?
It is clear that this is most likely due to the encoding at the stages of creating the signature and after during its verification. But is PHPMailer a glitch or did I set some input settings incorrectly?
PHPMailer 5.2.14
Charset UTF-8
Encoding 8bit

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2019-12-25
@shambler81

Do you know how Cyrillic characters are sent via RFC?
All examples on the Internet of sending php are in English, and there is no such problem there.
However, if you return to RFC 2045
In general, live and learn
https://habr.com/en/post/17531/

A
Andrey Ivanov, 2020-01-06
@orange12

I forgot to unsubscribe. In general, I encoded the body of the letter in base64. Well, respectively, by setting the Content-Transfer-Encoding: base64 header. So the problem was solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question