Revision 824735fc
Von Moritz Bunkus vor mehr als 2 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
952 | 952 |
$mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email}; |
953 | 953 |
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|; |
954 | 954 |
$mail->{fileid} = time() . '.' . $$ . '.'; |
955 |
$mail->{content_type} = "text/html"; |
|
955 | 956 |
my $full_signature = $self->create_email_signature(); |
956 |
$full_signature =~ s/\r//g; |
|
957 | 957 |
|
958 | 958 |
$mail->{attachments} = []; |
959 | 959 |
my @attfiles; |
960 | 960 |
# if we send html or plain text inline |
961 | 961 |
if (($self->{format} eq 'html') && ($self->{sendmode} eq 'inline')) { |
962 |
$mail->{content_type} = "text/html"; |
|
963 | 962 |
$mail->{message} =~ s/\r//g; |
964 | 963 |
$mail->{message} =~ s{\n}{<br>\n}g; |
965 |
$full_signature =~ s{\n}{<br>\n}g; |
|
966 | 964 |
$mail->{message} .= $full_signature; |
967 | 965 |
|
968 | 966 |
open(IN, "<", $self->{tmpfile}) |
... | ... | |
1234 | 1232 |
|
1235 | 1233 |
return undef unless $body; |
1236 | 1234 |
|
1235 |
$body .= GenericTranslations->get(translation_type => "salutation_punctuation_mark", language_id => $self->{language_id}); |
|
1236 |
$body = '<p>' . $::locale->quote_special_chars('HTML', $body) . '</p>'; |
|
1237 |
|
|
1237 | 1238 |
my $translation_type = $params{translation_type} // "preset_text_$self->{formname}"; |
1238 | 1239 |
my $main_body = GenericTranslations->get(translation_type => $translation_type, language_id => $self->{language_id}); |
1239 | 1240 |
$main_body = GenericTranslations->get(translation_type => $params{fallback_translation_type}, language_id => $self->{language_id}) if !$main_body && $params{fallback_translation_type}; |
1240 |
$body .= GenericTranslations->get(translation_type => "salutation_punctuation_mark", language_id => $self->{language_id}) . "\n\n"; |
|
1241 | 1241 |
$body .= $main_body; |
1242 | 1242 |
|
1243 | 1243 |
$body = $main::locale->unquote_special_chars('HTML', $body); |
... | ... | |
3440 | 3440 |
} |
3441 | 3441 |
|
3442 | 3442 |
sub create_email_signature { |
3443 |
|
|
3444 | 3443 |
my $client_signature = $::instance_conf->get_signature; |
3445 | 3444 |
my $user_signature = $::myconfig{signature}; |
3446 | 3445 |
|
3447 |
my $signature = ''; |
|
3448 |
if ( $client_signature or $user_signature ) { |
|
3449 |
$signature = "\n\n-- \n"; |
|
3450 |
$signature .= $user_signature . "\n" if $user_signature; |
|
3451 |
$signature .= $client_signature . "\n" if $client_signature; |
|
3452 |
}; |
|
3453 |
return $signature; |
|
3454 |
|
|
3455 |
}; |
|
3446 |
return join '', grep { $_ } ($user_signature, $client_signature); |
|
3447 |
} |
|
3456 | 3448 |
|
3457 | 3449 |
sub calculate_tax { |
3458 | 3450 |
# this function calculates the net amount and tax for the lines in ar, ap and |
Auch abrufbar als: Unified diff
E-Mails als HTML verschicken: Versand in Einkaufs-/Verkaufsbelegen