Revision 766

Date:
2019/01/31 16:55:43
Author:
ahitrov
Revision Log:
External field "from" used for queue mailing

Files:

Legend:

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

     
    18 18 ],
    19 19 },
    20 20 { 'attr' => 'cc', 'type' => 'text', 'rusname' => 'Дополнительные получатели (по одному на строку)', rows => 10 },
    21 { 'attr' => 'from', 'type' => 'string', 'rusname' => 'Адрес отправителя' },
    21 22 { 'attr' => 'body_text', 'type' => 'text', 'rusname' => 'Текст письма (txt)', 'rows' => 40 },
    22 23 { 'attr' => 'body_html', 'type' => 'wysiwyg', 'rusname' => 'Текст письма (html)', 'rows' => 40 },
    23 24 { 'attr' => 'error', 'type' => 'text', 'rusname' => 'Сообщение об ошибке', 'rows' => 5 },
  • utf8/core/lib/Contenido/Mail.pm

     
    78 78 } else {
    79 79 $emailfrom = $efrom;
    80 80 }
    81 } elsif ( $state->{email_from} ) {
    82 $emailfrom = $self->{from}
    81 } elsif ( $self->from ) {
    82 $emailfrom = $self->from;
    83 83 }
    84 84
    85 85 my ($emailto, @to);
     
    221 221 } elsif ( exists $email->{cc} && $email->{cc} ) {
    222 222 $que->cc( $email->{cc} );
    223 223 }
    224 if ( exists $email->{from} && $email->{from} ) {
    225 $que->from( $email->{from} );
    226 }
    224 227 $que->subject( $email->{subject} );
    225 228 $que->body_html( $email->{body} );
    226 229 if ( exists $email->{text} ) {
  • utf8/core/services/mail_process.pl

     
    47 47 if ( $mail->cc ) {
    48 48 $data->{cc} = [split /\n/, $mail->cc];
    49 49 }
    50 if ( $mail->from ) {
    51 $data->{from} = $mail->from;
    52 }
    50 53 if ( $mail->body_text ) {
    51 54 $data->{text} = $mail->body_text;
    52 55 }