+ # for older configs, replace email preset text if not yet set.
+ $config->{email_subject} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "preset_text_periodic_invoices_email_subject");
+ $config->{email_body} ||= GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "salutation_general")
+ . GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "salutation_punctuation_mark")
+ . "\n\n"
+ . GenericTranslations->get(language_id => $::form->{lanuage_id}, translation_type => "preset_text_periodic_invoices_email_body");
+ $config->{email_body} =~ s{\A[ \n\r]+|[ \n\r]+\Z}{}g;