Reputation: 60851
We just migrated our PHP 5.2 / IIS 8 website to a new server.
We are unable to use the MAIL function.
mail($to, $subject, $message, $headers);
that returns:
the 500 error
mail
function to work?Upvotes: 1
Views: 3774
Reputation: 5661
By default PHP uses sendmail, You need to configure your PHP setting to use a SMTP server on windows.
The link below will get you started...
http://geekswithblogs.net/tkokke/archive/2009/05/31/sending-email-from-php-on-windows-using-iis.aspx
Upvotes: 3
Reputation: 12904
500 is a permanent smtp error and therefore there is either a problem with the configuration of the mail server or the recipient of the email.
If you telnet to the server on port 25 and issue the following commands;
helo localhost
mail from:<your.email.address>
rcpt to:<recipient.email.address>
data
ctrl c
What happens?
Upvotes: 1