php - Magento new shipment email blank when sending programatically -


i have 2 servers running magento, 1 dev server , 1 live.

i sending shipment emails programatically after adding tracking information external source.

the email works fine using code below on dev server body of email blank on live server though subject line correct. when send email using interface admin side, works fine on live server , proper email goes through.

any ideas why might happening ? thank you

here code

$shipment = mage::getmodel('sales/order_shipment')->loadbyincrementid($shipmentid);  if(!$shipment->getemailsent()) {                    $shipment->sendemail();     $shipment->setemailsent(true);     $shipment->save();                           } 

edit:

upon viewing exception.log file found reason

exception 'zend_controller_response_exception' message 'cannot send headers; headers sent

this due retrieving tracking info sending post request api. resolve headers issue ?

hopefully helps facing similar problem. issue was outputting text before calling email sending block causing error of headers not being sent.

i removed text , worked fine.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -