public function send_cancellation_confirmation($order) { // delivery cancelled mail to customer $to = $order->email; $from = "From: " . basket::getEmailAddress(); $subject = basket::replaceStringsAll(basket::getOrderCancelledEmailSubject(), $order); $body = basket::getOrderCancelledEmail() . "\r\n" . basket::getOrderEmailClosing() . ""; //replace variables $body = basket::replaceStringsAll($body, $order); //send mail mail($to, $subject, $body, $from); }