📜 ⬆️ ⬇️

Problems with DKIM in the class phpmailer

If you have a windows server, you use the phpmailer mail sending class, sign your letters with DKIM , send emails to gmail and get dkim = hardfail every time, but have already tried everything you can - look at the headers of the email being sent.

If the DKIM-Signature header looks like this ( From and To in the z variable are empty) ...

DKIM-Signature: v=1; a=rsa-sha1; q=dns/txt; l=114; s=oboi;
t=1300563690; c=relaxed/simple;
h=From:To:Subject;
d=oboi.ws; i=noreply@oboi.ws;
z=
|
|Subject:=20=D0=9F=D0=B8=D1=81=D1=8C=D0=BC=D0=B5=D1=86=D0=BE=20=D0=B2=20=D0=BA=D0=BE=D0=BD=D0=B2=D0=B5=D1=80=D1=82=D0=B52;
bh=FpLEEuqL6DiQ4kqwe2qin77huEQ=;


... then open the file class.phpmailer.php, find line number 2277 and replace it with
')
$headers = explode("\r\n",$headers_line);

on

$headers = explode("\n",$headers_line);

and everything will be fine with you.

I do not pretend to be new, but I can not write. He himself killed 18 hours to find it.

Source: https://habr.com/ru/post/115820/


All Articles