Mail function issue (not sending mail)

Newbie here. Please forgive any ignorance in my question.

I am working with some folks on their website (translation, I have been made their web person by default). The site is a WordPress installation. They have two pages which send emails to various admins (one for unsubscribing from their newsletter, one for “contact”). Until last week both forms worked fine. Then suddenly, one form stopped working.

The form which is not working does uses libmail_html.php, the still functioning page uses mail() directly within the page, not via libmail_html.php.

I tried bypassing libmail_html.php by copying and pasting the mail() code from the working page to the non-working page. The mail submissions still failed to arrive at their destination although mail() returned TRUE. As far as we can tell it is not a “spam filter” issue (on both pages destination emails are the same domain as the website), there are no PHP errors in the log which point to any failure of the PHP on the page in question. As far as I can tell, PHP believes it is sending the email but it simply isn’t going out. I am perplexed why one form works, one fails even when the mail() code from the functional page is dropped into the nonfunctional page.

What am I missing here?

Go back to basics and just hard code the mail send into the non working form and see what happens…

[php]mail(‘[email protected]’, ‘My Subject’, ‘This is a message’, ‘From: my website [email protected]’);[/php]

And see if the email is sent, replace the email addresses with correct email addresses above.

I have done that. still nothing coming through.

So you have 1 form that sends email and 1 don’t and they are hosted on the same server?

Yup. Same server, same folder on the server. It doesn’t make any sense to me.

Sounds like something changed, even-though you think nothing changed.

Sometimes the content of the message will prevent the mail function from sending, that’s why I said hard code it to see if it work, but you said it didn’t. So I’m at a loss on what to suggest to try next.

Since both forms are in the same folder, then it shouldn’t be global .ini settings or anything to that nature.

Yea, I came to the same conclusions and am also at a loss. I’m still hoping someone out there has seen this before and has a solution.

Sponsor our Newsletter | Privacy Policy | Terms of Service