0

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 1.9.1.1. is there any flag to set for sending a email?

Any Ideas?

0

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 {
        $order->sendNewOrderEmail();
    }
    catch(Exception $e) {
        Mage::logException($e);
    }
}
Mage::dispatchEvent("checkout_submit_all_after", array("order" => $order, "quote" => $quote));

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

https://www.magentocommerce.com/magento-connect/smtp-pro-email-free-custom-smtp-email.html

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.