Revision 759

Date:
2018/12/04 09:35:36
Author:
ahitrov
Revision Log:
cc-mails also come to "RCPT TO"

Files:

Legend:

 
Added
 
Removed
 
Modified
  • utf8/core/lib/Contenido/Mail.pm

     
    113 113 if ( exists $email->{cc} && ref $email->{cc} eq 'ARRAY' ) {
    114 114 foreach my $cc ( @{ $email->{cc}} ) {
    115 115 my ($cce, $ecce) = $cc =~ /^(.*?)<(.*?)>/ ? ($1, $2) : $cc =~ /<(.*?)>/ ? ('',$1) : ('',$cc);
    116 $cc = $ecce;
    116 $email->{cc} = ($cce ? $cce.' ' : '').'<'.$ecce.'>';
    117 push @to, $ecce;
    117 118 }
    118 $ccmail = join ', ', (@to, @{$email->{cc}});
    119 $ccmail = join ', ', @{$email->{cc}};
    119 120 } elsif ( exists $email->{cc} && $email->{cc} ) {
    120 121 my ($cce, $ecce) = $email->{cc} =~ /^(.*?)<(.*?)>/ ? ($1, $2) : $email->{cc} =~ /<(.*?)>/ ? ('',$1) : ('',$email->{cc});
    121 $ccmail = join ', ', (@to, $ecce);
    122 $ccmail = ($cce ? $cce.' ' : '').'<'.$ecce.'>';
    123 push @to, $ecce;
    122 124 }
    123 125
    124 126 my $body = $email->{body};
  • utf8/core/services/mail_process.pl

     
    39 39 foreach my $row ( @$ids ) {
    40 40 my $mail = $keeper->get_document_by_id($row->[0], class => 'Contenido::Email');
    41 41 if ( ref $mail ) {
    42 my @to = split /,\s*/, $mail->name;
    43 42 my $data = {
    44 to => \@to,
    43 to => [split /,\s*/, $mail->name],
    45 44 subject => $mail->subject,
    46 45 body => $mail->body_html,
    47 46 };