X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/e4896c39b96b7ff311d61a36cf9128ebb305a24b..d26c95718cac0a2994ab4e9633b59f420a0816b4:/invoice_send.php diff --git a/invoice_send.php b/invoice_send.php index 9f933a0c..a013bdf7 100644 --- a/invoice_send.php +++ b/invoice_send.php @@ -70,14 +70,14 @@ if ($request->getMethod() == 'POST') { if (!ttValidEmailList($cl_cc, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.cc')); if (!ttValidString($cl_subject)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('form.mail.subject')); if (!ttValidString($cl_comment, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.comment')); - + if ($errors->isEmpty()) { // Save last invoice emails for future use. $sc->setValue(SYSC_LAST_INVOICE_EMAIL, $cl_receiver); - $sc->setValue(SYSC_LAST_INVOICE_CC, $cl_cc); - - $body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment); - + $sc->setValue(SYSC_LAST_INVOICE_CC, $cl_cc); + + $body = ttInvoiceHelper::prepareInvoiceBody($cl_invoice_id, $cl_comment); + import('mail.Mailer'); $mailer = new Mailer(); $mailer->setCharSet(CHARSET);