diff --git a/lib/Mail/DMARC/Policy.pm b/lib/Mail/DMARC/Policy.pm index 2e103b4c..9b1c5173 100644 --- a/lib/Mail/DMARC/Policy.pm +++ b/lib/Mail/DMARC/Policy.pm @@ -61,7 +61,7 @@ sub stringify { my %dmarc_record = %{$self}; # "v" tag must be the first one - my $dmarc_txt = 'v=' . $dmarc_record{v} . '; '; + my $dmarc_txt = 'v=' . delete $dmarc_record{v} . '; '; foreach my $key ( keys %dmarc_record ) { next if ($key =~ /^domain|v$/); $dmarc_txt .= "$key=$dmarc_record{$key}; ";