Automatically send an invoice??

We're upgrading our support forum. Replies are currently closed. Please view our Documentation and FAQ using the menu above.

We have been working on an area of our website where a user can submit a form and an invoice will automatically be generated in UCM for that customer for a specified fee that is set in a UCM custom data tool. Through the help of dtbaker we were able to get this far, but we want the invoice that is automatically generated through UCM to automatically be emailed to the associated customer. Does anyone know the code needed to automatically email an invoice?? We don’t want all invoices to automatically email, just the ones through this php code we have created. This is the code dtbaker provided to get a website to automatically generate an invoice in case anyone else can use it:


$invoice = module_invoice::get_invoice(false);
$invoice[‘date_create’] = date(‘Y-m-d’);
$invoice[‘customer_id’] = 123;
$new_invoice_id = module_invoice::save_invoice(‘new’,$invoice);
// generating a new invoice was successful, now add a task to the invoice:
$task = array(
‘invoice_id’ => $new_invoice_id’,
‘description’ => ‘invoice item’,
‘amount’ => 123.45,

The forum ‘General Support’ is closed to new topics and replies.

savioAutomatically send an invoice??