PHP Mail() No Longer Working
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: PHP Mail() No Longer Working
PHP Mail() No Longer Working
11-10-2020 7:46 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I just had the idea of adding a reCAPTCA thing to my website, when I noticed that the contact form no longer works.
I've used the PHP mail() function on a couple of pages and it's worked for years. I know that it's worked as recently as VE Day because I made a quiz for our virtual street party and the neighbours' answers came to me.
The scripts look like they're working - there are no obvious errors - but the messages don't arrive. Has anyone else noticed a similar problem?
Re: PHP Mail() No Longer Working
23-10-2020 1:57 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
There's been another change in behaviour - where the scripts used to run but not work, they now stop with an error 500.
Re: PHP Mail() No Longer Working
24-10-2020 2:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
OK - after some investigation it appears that it's got more fussy about the content of the message and if I swap the text to something very simple the message arrives.
Time for some more research!
Re: PHP Mail() No Longer Working
24-10-2020 2:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Could it be the server being fussy and thinking you're sending out spam (or something like that) and blocking it?
I've only ever used PHP a bit, so that is a pure guess.
Re: PHP Mail() No Longer Working
24-10-2020 3:15 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I run another site for work and the host for that started to get upset if we sent a message to more than "about" ten people, which was a bit inconvenient as we're teachers and often want to email a whole class.
These messages are only going to one person, though (me), and they go if the message is fixed at "hello" but not if the text comes from a web form. The messages validate as HTML5, so it's not that.
There's not obviously any support for the "CGI" web space, so it might be a question for something like StackOverflow!
Re: PHP Mail() No Longer Working
24-10-2020 3:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I assume you are using PlusNet hosting?
So it might be better (a member of staff may pick this up) to give them some info on what you are doing? Don't give away more than you need to on here as it public.
It could well be the case they've tightened up on security their side, so what used to work does not anymore. May just be a case of trial and error on your part and see what works and what doesn't. Then finding something which does which you're happy with.
Re: PHP Mail() No Longer Working
26-10-2020 11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In case someone else is having a similar problem...
I've done some tinkering and two of the three scripts are now working. Removing all e-mail addresses and URLs from the content of the message seemed to do the trick.
One of the pages was a contact form, and it used to say "Message sent from..." with a hyperlink to the page at the bottom. It seems that that was the problem.
PS. Yes - this is a page hosting the in the "CGI webspace". They're obviously doing some work on that because https://hosting.plus.net now looks completely different, and a couple of days again it said that I had no MySQL database, but now it's appeared again.
Re: PHP Mail() No Longer Working
27-10-2020 7:15 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Yeah sounds like they are doing some work behind the scenes. Hopefully it will settle down after a while and it will be back to normal.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: PHP Mail() No Longer Working