500 when trying to use the MAIL function

We just migrated our PHP 5.2 / IIS 8 site to a new server.

We cannot use the MAIL function.

mail($to, $subject, $message, $headers); 

which returns:

error 500

  • How to enable detailed error messages?
  • is there something i need to install the mail function?
+1
php email iis error-handling
source share
2 answers

By default, PHP uses sendmail, you need to configure your PHP parameter to use the SMTP server in windows.

The link below will help you get started ...

http://geekswithblogs.net/tkokke/archive/2009/05/31/sending-email-from-php-on-windows-using-iis.aspx

+3
source share

500 is a constant smtp error, so there is a problem with the configuration of the mail server or message recipient.

If you connect to the server on port 25 and run the following commands:

 helo localhost mail from:<your.email.address> rcpt to:<recipient.email.address> data ctrl c 

What's happening?

+1
source share

All Articles