0

I noticed all of a sudden that any operation that has to do with sending email on my site returns with 504 server timeout page. Fortunately, the email gets sent but returns a 504 error. I went further to create a php script in the root of my application just to send email
<?php try{ mail('name@email.com', 'Testing Magento mail', 'Hello user. Did you get the mail?'); echo 'Mail sent'; }catch(Exception $e){ echo $e->getMessage(); }
but got the same effect of timeout. Mails were going fine prior to today and nothing was changed on the server. What could be wrong?

  • 1
    How did you configure PHP to send mail? – Michael Hampton Oct 24 '18 at 17:52
  • sendmail_path = "/usr/sbin/sendmail -t -i" – Kunsal Ajay Oct 24 '18 at 18:48
0

Yes I solved the issue. It has to do with the way my etc/hosts file was configured. I added this line to it.
127.0.0.1 myServername myServername.localdomain and it worked.

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.