X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FConf.pm;h=239e304ddf2af9a0a2be324c5fbda0fd561cd6c9;hb=2e4fa975e054554beac71883436b143267d7aa12;hp=39f12c25a1da1b7ffb096383e9bc269ed1dbb762;hpb=d03ab0df1ccbd3bdf54b3a85391879906d499097;p=freeside.git diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 39f12c25a..239e304dd 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -773,7 +773,7 @@ sub reason_type_options { { 'key' => 'log_sent_mail', 'section' => 'notification', - 'description' => 'Enable logging of template-generated email.', + 'description' => 'Enable logging of all sent email.', 'type' => 'checkbox', }, @@ -1233,9 +1233,24 @@ sub reason_type_options { { 'key' => 'invoice_from', 'section' => 'required', - 'description' => 'Return address on email invoices', + 'description' => 'Return address on email invoices (address only, see invoice_from_name)', 'type' => 'text', 'per_agent' => 1, + 'validate' => sub { $_[0] =~ + /^[^@]+\@[[:alnum:]-]+(\.[[:alnum:]-]+)+$/ + ? '' : 'Invalid email address'; + } + }, + + { + 'key' => 'invoice_from_name', + 'section' => 'invoicing', + 'description' => 'Return name on email invoices (set address in invoice_from)', + 'type' => 'text', + 'per_agent' => 1, + 'validate' => sub { (($_[0] =~ /[^[:alnum:][:space:]]/) && ($_[0] !~ /^\".*\"$/)) + ? 'Invalid name. Use quotation marks around names that contain punctuation.' + : '' } }, {