09-07-2018 04:21 AM
Hi,
I have a notification template where i am logging certain fields of the message headers. I have no issues with the default ones like $from, $subject. But am trying to pull fields that don't have a defined variable using the $header[‘string ’] format. I have tried a few different variations and am having no luck. Some examples that i have tried so far. I was also trying to extract other headers without a defined variable besides this one and no luck with those either.
SPF Record - "$Header['x-record-type']"
SPF Record - $Header['x-record-type']
SPF Record - $Header['x-record-type]
SPF Record - $Header'x-record-type'
Any help would be appreciated. thanks
09-10-2018 09:24 PM
I think the syntax you have is correct:
$Header['string ']
Did you try looking through this Chapter
Using Message Filters to Enforce Email Policies
09-25-2018 04:48 AM
Thanks i will reread that section again. Sorry about the late reply, i thought i had checked off the option to notify me when someone replied to my post.
05-06-2020 04:33 AM
I have used the variables it in the Notification templates & it worked. The correct syntax is:
$Header['Name of the header']
Here are few examples:
To retrieve the Reply-To header:
$Header['Reply-To']
To retrieve the Authentication-Results header which contains the details of the SPF, DKIM verification results:
$Header['Authentication-Results']
To retrieve the MIME version header:
$Header['MIME-Version']
To retrieve the Content-Type header:
$Header['Content-Type']
You could check the message properties in the user mail client (Outlook, Thunderbird) to find other relevant headers.
Hope it helps!
Prab
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide