user1601545
user1601545

Reputation: 23

Send email from magento

From our Magento 1.7.0 shop, we would like to send an email to a SMS gateway, when the shipping transactional email is sent. I really can't figure how to do this - any ideas?

The email to the SMS gateway should have the following content:

SMS gateway email adress: [email protected] Title: customes phonenumber content: we have sent your ordre today

Best regards, Jesper

Upvotes: 0

Views: 1524

Answers (1)

kalenjordan
kalenjordan

Reputation: 2446

You should be able to observe the sales_order_status_history_model_save_before event. From within you observer:

public function observeStatusHistorySave($observer)
{
     $status = $observer->getObject();
     if (!$status->getIsCustomerNotified()) {
         return false;
     }

     $customer = $status->getOrder()->getCustomer();
     sendSms($customer->getTelephone(), "etc...");         
}

Upvotes: 1

Related Questions