I am using API V2 for creating order - It's works fine but Magento not sending confirmation emails to the customer for new orders create via API!

I am using Magento is there any flag to set for sending a email?

Any Ideas?


you can use this code after placing order

$order = $service->getOrder();
if($order) {
    Mage::dispatchEvent("checkout_type_onepage_save_order_after", array("order" => $order, "quote" => $quote));
    try {
    catch(Exception $e) {
Mage::dispatchEvent("checkout_submit_all_after", array("order" => $order, "quote" => $quote));

if this won't work then you can go for this extension


and add your smtp settings, because sometimes php default mail function won't work as it don't have proper headers, and sometimes it gets blocked by the mail server.

but smtp settings always works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.