cancel
Showing results for 
Search instead for 
Did you mean: 

Email from PHP forms - no longer received

Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Email from PHP forms - no longer received

Help - anyone else affected?
Email sent using mail() in a PHP form is no longer arriving at my Outlook inbox.
It was functioning correctly on Saturday 18th at 6pm and has been for years before.
If I set the destination to a Gmail address, they are received.
Looking back at the old email headers, sections are different:
Now --------------------------------------------------------------------------
[tt]Return-Path: <username@ptn-ccgi01.plus.net>
Received: from ptb-cgirelay01.plus.net (ptb-cgirelay01.plus.net [195.166.130.40])
        by mx.google.com with ESMTP id c25si12021207ika.2007.08.21.01.50.05;
        Tue, 21 Aug 2007 01:50:05 -0700 (PDT)
Received-SPF: pass (google.com: domain of username@ptn-ccgi01.plus.net designates 195.166.130.40 as permitted sender) client-ip=195.166.130.40;
Authentication-Results: mx.google.com; spf=pass smtp.mail=username@ptn-ccgi01.plus.net
[/tt]

On the 18th and before-----------------------------------------------------
[tt]Return-Path: <postmaster@username.f9.co.uk>
Received: from ptb-cgirelay01.plus.net (ptb-cgirelay01.plus.net [195.166.130.40])
        by mx.google.com with ESMTP id y37si6903697iky.2007.08.18.10.40.29;
        Sat, 18 Aug 2007 10:40:30 -0700 (PDT)
Received-SPF: neutral (google.com: 195.166.130.40 is neither permitted nor denied by best guess record for domain of postmaster@username.f9.co.uk) client-ip=195.166.130.40;
Authentication-Results: mx.google.com; spf=neutral smtp.mail=postmaster@username.f9.co.uk
[/tt]
--------------------------------------------------------------------------------
The differences are that SPF records are now 'passed' rather than neutral, and the return path is now "username@ptn-ccgi01.plus.net" rather than the previous "postmaster@username.f9.co.uk"
I have tried a few more tests including just:
<?php
          $messagebody ="test message";
          $sendaddress = "test@mydomain.co.uk";
          $subject="test message";
          $emailheaders="from: me@mydomain.co.uk";
          mail($sendaddress, $subject, $messagebody, $emailheaders);
?>
The email does not get through, but if I alter the $sendaddress to a Gmail one, it does get there...
Can anyone shed some light on this? Any help/comments would be welcome.
14 REPLIES 14
astarsolutions
Grafter
Posts: 393
Registered: ‎26-07-2007

Re: Email from PHP forms - no longer received

Do e-mails only reach a Gmail address, have you tried any others?
Is the other address a Plusnet one?
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: Email from PHP forms - no longer received

Hi Astarsolutions,
I have since tried to a Hotmail.com address and it is successful.
The 'in house' addresses I have tried are xxxx@mydomain.co.uk and xxxx@username.force9.co.uk
I have been with force9 (f9) since 1997 and have had a PHP ccgi web site since 2003. I am a business user and a couple of years ago I progressed to a web form for customers to contact me when they want support.
I have not had any problems until the period since Saturday evening.
According to the relevant Plusnet User Group item, SPF records have yet to be implemented, and yet Google reckons that the emails have 'passed' the SPF test, where before Saturday, they were classed as 'neutral'.... Strange.
xpher
Grafter
Posts: 58
Registered: ‎02-08-2007

Re: Email from PHP forms - no longer received

I am having exactly same problem with my contact form. It was working fine, but not now. If I substitute my domain email with a Yahoo email address it works perfectly. I need it to work with my domain name.. how now?Huh
astarsolutions
Grafter
Posts: 393
Registered: ‎26-07-2007

Re: Email from PHP forms - no longer received

Are you still having this problem?
You initially mentioned altering the script, do you normally specify the sender address if so is this your Plusnet one (not your domain)?
I don't remember seeing any service status messages that would explain any changes like this so I would raise a ticket if you haven't done already.
xpher
Grafter
Posts: 58
Registered: ‎02-08-2007

Re: Email from PHP forms - no longer received

from my php script for the mail() I have a var of $SendTo
this becomes
$SendTo = "me@mydomain.xx.xx";
which was working fine. No longer works.
if I put
$SendTo = "xxxxxxx@yahoo.co.uk";
I receive the contents of form at my Yahoo address. That works.
Thought it might be to do with mail problems but have sent mail to my domain with no problems.
Chris
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: Email from PHP forms - no longer received

I raised a support ticket about the issue.
They advised modifying the mail() command to add the optional "-f" parameter.
e.g. mail($sendaddress, $subject, $messagebody, $emailheaders, "-f me@mydomain.co.uk");
This seems to work and I have altered my mailform scripts accordingly.
They have also said "there has not been any recent changes to the system that would have affected this".
Obviously something has changed or the modification would not have been necessary and the headers would not be different.
xpher
Grafter
Posts: 58
Registered: ‎02-08-2007

Re: Email from PHP forms - no longer received

Thanks very much for that.
I agree there must have been some changes.
quelquod
Pro
Posts: 668
Thanks: 163
Fixes: 1
Registered: ‎31-07-2007

Re: Email from PHP forms - no longer received

I have had the same sort of problems recently (last week or two) but it is not a rock solid fault in that some email messages do get through whilst others do not. Nothing has been changed in my scripts for a couple of years or more nor have any of my email addresses changed.
The mails in question are automated PHPBB responses to someone registering on my site. About half arrive and the others don't. The database is updated OK - just no email response.
Democracy - 3 wolves and a lamb voting about what to have for lunch!
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Email from PHP forms - no longer received

Hi there,
There was a problem recently with some of the CGI servers not being in DNS (ie. not having a valid PTR record). This was causing sender-verify to fail for some of the emails being sent via the CGI platform.
My guess is that it was this causing some of the issues being reported in this thread. Incidentally the problem was resolved during the last 48 hours so things should be working to design now.
Are people still having problems?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

Bookman
Grafter
Posts: 269
Thanks: 1
Registered: ‎02-08-2007

Re: Email from PHP forms - no longer received

Hi Bob,
I reported in a ticket to PN that I had this problem. Your people changed something and my emails from the cgi scripts started arriving again - but they had the From address as username@ptn-ccgi01.plus.net instead of the original username@ccgi.plus.net
This meant I had to change various filters in Thunderbird which I had set to recognise the new mail address.
Then I was told by PN that I would need "to make sure that your script/s sets the envelope sender address to username@ccgi.plus.net" followed today by another reply saying "The problem has now been fixed. You should not have to make any changes to your scripts". Fortunately I had not had time to change them!
I am still receiving the emails from the new address. Will this continue or will they start arriving again from the original address?
Thanks!
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: Email from PHP forms - no longer received

Hi Bob,
I have tried altering the:
mail($sendaddress, $subject, $messagebody, $emailheaders, "-f me@mydomain.co.uk");
back to the original:
mail($sendaddress, $subject, $messagebody, $emailheaders);
and it seems to work in that it has delivered the email to my inbox. The one with the "-f me@mydomain.co.uk" section still works as well.
Since I made the changes in several files to include the "-f me@mydomain.co.uk", will there be any problem if I just leave them with the "-f me@mydomain.co.uk" ?
KJCGames
Newbie
Posts: 6
Registered: ‎24-08-2007

Re: Email from PHP forms - no longer received

When asked why this problem hadn't been reported in the service status I got this reply:
The service status is only used if it is a service outage. The CGI service is working fine. One of the CCGI servers had lost it's DNS entry and if the email was sent from that server it did not arrive. If is was sent from the other 3 servers it arrives fine.
Regards,
Kevin Scott
Email not being sent is what I would call a serious service outage. Especially as 100% of 3 days worth of our website cgi form mail was lost this way.
Bookman
Grafter
Posts: 269
Thanks: 1
Registered: ‎02-08-2007

Re: Email from PHP forms - no longer received

Quote from: KJCGames
Email not being sent is what I would call a serious service outage. Especially as 100% of 3 days worth of our website cgi form mail was lost this way.

I have to agree with KJCGames - for me it was 5 days worth of customer leads lost and no way of knowing now who those people were. At first I thought perhaps the whole world had gone on holiday, then I spent time trying to figure out what we had done wrong here, then concluded it had to be PN, then waiting for PN to sort it.
  Sad
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Email from PHP forms - no longer received

Quote from: Tony
Since I made the changes in several files to include the "-f me@mydomain.co.uk", will there be any problem if I just leave them with the "-f me@mydomain.co.uk" ?

No, that shouldn't cause any problems.

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵