0

the following statement expires my page in the class when saving shipment. the statment is:

$mailer->send();

Expires in this class when the shipment is saved and try to send email to the customer

class Mage_Sales_Model_Order_Shipment extends Mage_Sales_Model_Abstract

I want to debug why it is expiring my page. Where is the definition of the function or any other way to display the error message?

EDIT: When I am trying to create shipment for an order, the page throws this error:

"Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'."

When I Investigate the problem by exploring the code, I reach $mailer->send();, the issue is not of the php max time expire, it always display this message on the same statement for some orders. I logged the timing also but the timing is not the issue. It expires on the same statement again and again also the email is not sending to the customer.

This issue appears for amazon orders only.

2
  • "Expires my page"? Can you explain that a little more?
    – benmarks
    Jun 3, 2013 at 15:13
  • I have edited the question :)
    – Tariq Aziz
    Jun 3, 2013 at 15:25

2 Answers 2

1
$mailer = Mage::getModel('core/email_template_mailer');

This is where the mailer is defined. The abstract Factory is used to pull this, which calls the class Mage_Core_Model_Email_Template_Mailer.

You can find the send() method in that class.

Also, whenever debugging, you can always call a log message of classes to help better debug.

Mage::log(get_class($mailer)); // for example.

I hope this helps.

0

Mage->Core->Model->Email->Template->Mailer.php

Are you positive that your email server is setup correctly? I would start there before mucking around in the Mailer file.

3
  • If that was an issue, then it will never send for other orders. The issue is specific to amazon orders.
    – Tariq Aziz
    Jun 3, 2013 at 15:29
  • @TariqAziz This piece of information should definitely be part of your original question!
    – benmarks
    Jun 3, 2013 at 15:44
  • Question Edited.
    – Tariq Aziz
    Jun 3, 2013 at 16:00

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.