treehouse : what would you like to learn today?
Web Design Web Development iOS Development

mail function gives me 500 Internal Server Error

  • Hi guys.

    I have this simple contact form that sends an email and it works 100% with any email with domain different from where the website is hosted.
    However, when I try to send the email to any other with the same domain of my website it gives me the 500 Internal Server Error.

    I'm sure that the mail() function is the one who provokes this error, when I delete that line the error disappears.

    Any idea what's happening? Any solutions?
  • Hi Xavjr, you might need to contact your hosting provider for this one

    Could you post up our code and we can take a look
  • Hi, thanks for your answer. It was some hosting configuration problem, they solve it.