| 1 | package Sisimai::Rhost::Aol; | ||||||||||||||||||||
| 2 | 5 | ▶ | use v5.26; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 5 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 47 | ▶ | sub find { | ||||||||||||||||||
|
Subroutine
find: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||
| 7 | # Detect bounce reason for Aol Mail: https://www.aol.com | ||||||||||||||||||||
| 8 | # @param [Sisimai::Fact] argvs Decoded email object | ||||||||||||||||||||
| 9 | # @return [String] Detected bounce reason | ||||||||||||||||||||
| 10 | # @see | ||||||||||||||||||||
| 11 | # - Y!Sender Hub/SMTP Error Codes: https://senders.yahooinc.com/smtp-error-codes/ | ||||||||||||||||||||
| 12 | # - The MX record of Aol points "mx-aol.mail.gm0.yahoodns.net". | ||||||||||||||||||||
| 13 | # @since v5.2.0 | ||||||||||||||||||||
| 14 | 47 | my $class = shift; | |||||||||||||||||||
| 15 | 47 | ▶ | my $argvs = shift // return ""; return "" unless $argvs->{'diagnosticcode'}; | ||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
shift() // (return "")
MC/DC100%1/1
shift() // (return "")
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 45 | require Sisimai::Eb; | |||||||||||||||||||
| 18 | 45 | state $messagesof = { | |||||||||||||||||||
| 19 | $Sisimai::Eb::ReHOST => ["Host or domain name not found"], | ||||||||||||||||||||
| 20 | $Sisimai::Eb::Re00MX => ["type=MX: Malformed or unexpected name server reply"], | ||||||||||||||||||||
| 21 | }; | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 45 | my $issuedcode = $argvs->{'diagnosticcode'}; | |||||||||||||||||||
| 24 | 45 | my $reasontext = ''; | |||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | 45 | for my $e ( keys %$messagesof ) { | |||||||||||||||||||
| 27 | # Try to find the error message matches with the given error message string | ||||||||||||||||||||
| 28 | 82 | ▶ | next unless grep { index($issuedcode, $_) > -1 } $messagesof->{ $e }->@*; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 29 | 19 | $reasontext = $e; | |||||||||||||||||||
| 30 | 19 | last; | |||||||||||||||||||
| 31 | } | ||||||||||||||||||||
| 32 | 45 | return $reasontext; | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 5 | 1; | |||||||||||||||||||
| 36 | __END__ | ||||||||||||||||||||