Link to home
Start Free TrialLog in
Avatar of snowdog_2112
snowdog_2112Flag for United States of America

asked on

wordpress, php, windows, iis 6 - wp_mail http error 500

I've inherited a wp site on a windows 2003 box with iis6 and php.

All of a sudden, any mail-related function throws an http 500 error and I get no output.

I've traced through the code to find the offending line: wp_mail ( );

If I comment it out, no error.  (No mail, of course, but no error).  Firebug gives me the http 500 error and some other info but nothing points to a culprit.

HELP!!
Avatar of snowdog_2112
snowdog_2112
Flag of United States of America image

ASKER

Update, fwiw.

I reinstalled and did a repair install of PHP on the server.  No difference.  Still getting an HTTP 500 error with anything that calls wp_mail.

I've pointed the SMTP server in WP to an external SMTP server to see if Wireshark would see any packets - nope.

I created a php page in the wp folder that DOES send mail using the php mailer - whatever the stock, default mail command uses.

Thsi tells me it's definitely in WP somewhere.
Avatar of Jason C. Levine
>> I've pointed the SMTP server in WP to an external SMTP server to see if Wireshark would see any packets - nope.

Hmph.  Can I ask you try it again and this time use the following to configure the email in WordPress?

http://wordpress.org/extend/plugins/configure-smtp/
Hmph?  Are you the author of the plug-in?

I was in no way suggesting the plug-in is not working.  I get the same http 500 on *any* mail operation, including Contact Form 7 (tried 2 different versions of cf7 too).

I do have it set up as shown in the link.  I was saying I've tried many different settings in an attempt to fix it or at least see if I can get more information pointing to the point of failure.

I've tried:
localhost
<ip of server>  <-- SMTP runs on the same server hosting this WP site.
127.0.0.1
<fqdn of server>
all the above, using port 8025  <-- added 8025 to local SMTP server.

Thanks.
>> Are you the author of the plug-in?

Good lord, no :)  I was hoping that you may have misconfigured something and giving you an admin interface to set SMTP settings in WordPress would have resolved that.  It's hard to gauge your skill level from the post.

>>  I get the same http 500 on *any* mail operation, including Contact Form 7 (tried 2 different versions of cf7 too).

Weird.  Which version of WP is running?
wordpress 3.0.1

Can't tell a version on configure-smtp
Contact Form 7 is 2.4.1

Still getting the http 500.

Let me know if there's anything else I can check.

My Skill Level (1 - 10, 10 = savant):
Windows - 8
IIS - 7
SMTP - 5
WP - 2
Still fighting this.  I've wiresharked the $#!+ out of this and can't see anything suggesting issue.

Since I can put a simple php page in the same IIS site and send mail using a php page, I am pretty sure php, iis, and smtp are working, this seems to me to point back to wordpress.

I just don't know enough of wp to know how to replace the wp_mail command with something like the php mail command...
Yeah, I'm not sure how to do it with IIS either.  Can you install WordPress 3.3.2 on a testing domain and see if it will send mail?  It may also be a version specific thing.
Waiting for my customer to authorize more time to spend chasing my tail on this...

Setting up a lab case would be hours of prep, and even if it works, there's not a good mechanism to transfer it to the problem system - i.e., if it works, that still doesn't tell me *why* it doesn't work on the problem machine, nor how to fix it.
if it works, that still doesn't tell me *why* it doesn't work on the problem machine, nor how to fix it.

No, but we can then refer to the changelog and see what they changed and start chasing it down from there.  

Alternately, if it works in 3.3.2 just upgrade WordPress on the production machine and that's the functional end of the issue.  The philosophical ending can be relegated to hobby status.
ASKER CERTIFIED SOLUTION
Avatar of snowdog_2112
snowdog_2112
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
no solution found.