Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Received SPF (getting full record) #17

Open
kriiv opened this issue Jun 23, 2022 · 1 comment
Open

Received SPF (getting full record) #17

kriiv opened this issue Jun 23, 2022 · 1 comment

Comments

@kriiv
Copy link

kriiv commented Jun 23, 2022

Hi,

In the readme, for some reason Received-SPF is listed twice under Headers.

$inbound->Headers('Received-SPF');
$inbound->Headers('MIME-Version');
$inbound->Headers('Received-SPF'); // pass neutral fail

I am wanting to get the full value of "Received-SPF" to then parse and get the sender IP address.
Currently it returns pass, neutral or fail, as described.

Is there an easy way to get the full record?

Many thanks,
Martin

@kriiv
Copy link
Author

kriiv commented Jun 23, 2022

For the moment, I'm looking through $inbound->Headers and grabbing "Received SPF" full record manually. :)

$json = json_decode(file_get_contents('php://input'));

foreach($json->Headers as $header) {
    if($header->Name == 'Received-SPF') {
        return $header->Value;
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant