Revision 852
- Date:
- 2023/08/15 13:52:02
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/core/lib/Contenido/Mail.pm
106 106 } else { 107 107 $emailto = $eto; 108 108 } 109 @to = ($emailto); 109 push @to, $emailto; 110 110 } 111 111 112 112 my $ccmail; 113 113 if ( exists $email->{cc} && ref $email->{cc} eq 'ARRAY' ) { 114 my @cc; 114 115 foreach my $cc ( @{ $email->{cc}} ) { 115 116 my ($cce, $ecce) = $cc =~ /^(.*?)<(.*?)>/ ? ($1, $2) : $cc =~ /<(.*?)>/ ? ('',$1) : ('',$cc); 116 $email->{cc} = ($cce ? $cce.' ' : '').'<'.$ecce.'>'; 117 push @to, $ecce; 117 if ( $cce ) { 118 $cce = MIME::Base64::encode($cce); 119 $cce =~ s/\s+$//si; 120 $cce = '=?utf-8?B?'.$cce.'?='; 121 push @to, $cce.' <'.$ecce.'>'; 122 push @cc, $cce.' <'.$ecce.'>'; 123 } else { 124 push @to, '<'.$ecce.'>'; 125 push @cc, '<'.$ecce.'>'; 126 } 118 127 } 119 $ccmail = join ', ', @{$email->{cc}}; 128 $ccmail = join ', ', @cc; 120 129 } elsif ( exists $email->{cc} && $email->{cc} ) { 121 130 my ($cce, $ecce) = $email->{cc} =~ /^(.*?)<(.*?)>/ ? ($1, $2) : $email->{cc} =~ /<(.*?)>/ ? ('',$1) : ('',$email->{cc}); 122 $ccmail = ($cce ? $cce.' ' : '').'<'.$ecce.'>'; 123 push @to, $ecce; 131 if ( $cce ) { 132 $cce = MIME::Base64::encode($cce); 133 $cce =~ s/\s+$//si; 134 $cce = '=?utf-8?B?'.$cce.'?='; 135 $ccmail = $cce.' <'.$ecce.'>'; 136 } else { 137 $ccmail = $ecce; 138 } 139 push @to, $ccmail; 124 140 } 125 141 126 142 my $body = $email->{body};