# without a recipient, we cannot send a mail
if (!$ref || !$ref->{recipient}) {
$main::lxdebug->leave_sub();
# without a recipient, we cannot send a mail
if (!$ref || !$ref->{recipient}) {
$main::lxdebug->leave_sub();
}
# without a sender we cannot send a mail
# two cases: check mail from 1. current user OR 2. employee who created the invoice
}
# without a sender we cannot send a mail
# two cases: check mail from 1. current user OR 2. employee who created the invoice
$mail->{to} = $ref->{recipient};
$mail->{subject} = $template->parse_block($ref->{email_subject});
$mail->{message} = $template->parse_block($ref->{email_body});
$mail->{to} = $ref->{recipient};
$mail->{subject} = $template->parse_block($ref->{email_subject});
$mail->{message} = $template->parse_block($ref->{email_body});