php mail() suddenly stop working. . .

I’m developing a simple membership application process, user fills out online membership application form, goes to PayPal to pay via simple “buy now” button, then the “return” page html displays “thanks for your payment, blah, blah, blah.” Behind the scenes in the “return” page, the php mail() function sends the application form data to the membership chairman. After two dozen tests everything was working fine, then Sunday the process stopped sending the emails (or they were not delivered, but do not show up in the spam/junk folders.) Everything still works perfectly except the emails don’t get sent.

I’m at a loss as to why. To test if the problem was with my script, I copied the php mail() example from w3schools.com and pasted it into a new php script, uploaded to the server and tested. The html portion works perfectly but still the emails don’t get sent. Note: I changed the emails in the copied script to my real email addresses of course. In the code below, the email addresses are fake for security/privacy reasons.

Does anyone have any ideas why the mail() suddenly function stopped sending emails? Thanks!

[php]<?php // emailtest.php

include(‘templates/header.html’);
include(‘templates/sidebar.html’);
include(‘templates/wings.html’);
?>

Test php mail() - direct copy from W3Schools.com.

<?php include('templates/footer.html'); ?>[/php]

this line:

<div class="content"

is missing a closing bracket >

<div class="content">

Well, duh! Thanks Redscouse!

Unfortunately, that was not the issue. Something happened when I copied and pasted the code because in looking at my working files the bracket is where it should be. As I mentioned, the html rendered the page correctly but the emails did not get sent. But here’s the weired part - the email process suddenly started working again yesterday!

After posting my question I discovered that our forum software (we use phpBB) was also not sending out emails (like new user activation emails.) So maybe our website Host provider (hostmonster.com) was doing something behind the scenes. Or maybe there was shift in the Van Allen Belt. . . . or maybe. . .

Hey man I was just pointing out an error in the code.

I hate it when stuff like that happens because you’ll probably never find out what happened and it will nag away at you for a while.

Glad to hear it’s working again :wink:

Yes, thanks. I hate it when I make stupid mistakes and don’t see them!

Yes, still working and I probably won’t ever figure out why it stopped temporarily! Now I have a different issue that I will post in a new topic!

Sponsor our Newsletter | Privacy Policy | Terms of Service