Open GoogleCodeExporter opened 8 years ago
Look at http://code.google.com/p/php-mail-domain-signer/wiki/mailDomainSigner
at section "method getDomainKey"
There is some notes:
NOTE: the $h and $_h arguments must be in right order if to header location
upper the from header it should ordered like "to:from", don't randomize the
order for better validating result.
NOTE: if your DNS TXT contained g=, remove it
So, you should remove "g=xxx" parameter in dns txt, and make sure the headers
is in right order.
This code:
...
"to:from",
array(
$headers['to'],
$headers['from']
),
...
Will not works if your mail headers for to and form didn't in right order.
Example:
THIS WON'T WORK:
headers
-------
From: me@example.com
To: test@example.com
Subject: Test
getDomainKey
------------
...
"to:from",
array(
$headers['to'],
$headers['from']
),
...
THIS SHOULD WORK:
headers
-------
From: me@example.com
To: test@example.com
Subject: Test
getDomainKey
------------
...
"from:to",
array(
$headers['from'],
$headers['to']
),
...
THE EASIEST WAY
===============
Look at the raw example:
http://code.google.com/p/php-mail-domain-signer/source/browse/trunk/test_raw.php
It will automatically ordering the headers for your mail :)
Original comment by amaru...@gmail.com
on 7 Jan 2013 at 2:48
Original issue reported on code.google.com by
mcuad...@gmail.com
on 23 May 2012 at 4:28