Solved

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

Posted on 2012-04-11
11
754 Views
Last Modified: 2012-08-04
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!!
0
Comment
Question by:snowdog_2112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 

Author Comment

by:snowdog_2112
ID: 37837630
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.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37841041
>> 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/
0
 

Author Comment

by:snowdog_2112
ID: 37843391
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.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37843578
>> 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?
0
 

Author Comment

by:snowdog_2112
ID: 37889783
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
0
 

Author Comment

by:snowdog_2112
ID: 37933372
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...
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37933377
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.
0
 

Author Comment

by:snowdog_2112
ID: 37994626
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.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37994699
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.
0
 

Accepted Solution

by:
snowdog_2112 earned 0 total points
ID: 38237857
Sorry guys - the end use on this has not authorized additional resources (i.e., money) for me to fix the issue.  Thanks all for the help, but I still have no answer.  Hopefully we can do a version upgrade soon and fix it that way.

Thanks again.
0
 

Author Closing Comment

by:snowdog_2112
ID: 38257535
no solution found.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question