Solved

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

Posted on 2012-04-11
11
716 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
  • 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
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…

825 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