Sending Multiple Open Orders (From Different Vendors) Through 1 Mail?

Hi guys,
I want to change the way order mails were send from multiple vendors' email addresses into one mail from our main email address when customer submitting orders from different vendors.
But now, I cannot seems to find the php function that send the email or select which template to send the email through when submitting orders.
Do anybody tried to modify how it send email to customers, or at least the way to create new email template and create simple addon function to send this?
Thanks in advance!

Hi guys,
I want to change the way order mails were send from multiple vendors' email addresses into one mail from our main email address when customer submitting orders from different vendors.
But now, I cannot seems to find the php function that send the email or select which template to send the email through when submitting orders.
Do anybody tried to modify how it send email to customers, or at least the way to create new email template and create simple addon function to send this?
Thanks in advance!

Hello!

You should look into the fn_order_notification function in app/functions/fn.cart.php.