Author Topic: Saratoga Contact PHP not working  (Read 1282 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Saratoga Contact PHP not working
« on: December 19, 2024, 01:25:27 PM »
Anyone else having issues with the Contact Us PHP form?  I'm using the number LP version currently.  But I tried the hCapcha version as well.  Neither one is working at the moment.

I have the same PHP running on my home Synolgy NAS test server as my main site, and it doesn't work there either.  So I don't think it's my host that causing the issue.

I've tried changing from my ISP email to Gmail.  Neither get the emails, even though the site claims it was sent.

Only reason I figured out it wasn't working is I looked at my contact-loglp.txt file for logging and it had a couple of people I didn't get emails from.  Guessing from the log vs. my emails, it probably quit sometime this summer.  I'm not seeing any errors in my main hosting error logs either.  Only entry was when I misconfigured the hCaptcha version.  Once I fixed that, it still didn't go out.  I've ditched that version since it seems some bots can get by it.

https://www.bismarckweather.net/wxcontact.php
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 799
    • Lake Huron Weather
Re: Saratoga Contact PHP not working
« Reply #1 on: December 19, 2024, 01:35:28 PM »
Funny you bring this up, I just checked mine (LP version) this morning.
Mine is working.
Never did have success with getting a gmail account to work.
CW3699

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga Contact PHP not working
« Reply #2 on: December 19, 2024, 02:12:57 PM »
I have an email forwarder with my hosting plan.  It forwarded my single bismarckweather.net email address to my ISP email.  That didn't work either. 
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9722
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Contact PHP not working
« Reply #3 on: December 19, 2024, 05:35:44 PM »
Anyone else having issues with the Contact Us PHP form?  I'm using the number LP version currently.  But I tried the hCapcha version as well.  Neither one is working at the moment.

I have the same PHP running on my home Synolgy NAS test server as my main site, and it doesn't work there either.  So I don't think it's my host that causing the issue.

I've tried changing from my ISP email to Gmail.  Neither get the emails, even though the site claims it was sent.

Only reason I figured out it wasn't working is I looked at my contact-loglp.txt file for logging and it had a couple of people I didn't get emails from.  Guessing from the log vs. my emails, it probably quit sometime this summer.  I'm not seeing any errors in my main hosting error logs either.  Only entry was when I misconfigured the hCaptcha version.  Once I fixed that, it still didn't go out.  I've ditched that version since it seems some bots can get by it.

https://www.bismarckweather.net/wxcontact.php
Definitely, the contactLP is much more resistant to hackers than the Google reCaptcha and the hCaptcha versions

It may be that your mailer doesn't like having a From: header in the message which doesn't match YOUR userid@hostname, but will allow a Reply-to: header.

Try changing contactLP-inc.php from
Quote
   mail($mailto,$subj,$msg,"From: $EMname <$EMaddress>\r\nReply-to: $EMname <$EMaddress>");
to
Quote
   mail($mailto,$subj,$msg,"Reply-to: $EMname <$EMaddress>");

As many hosters tighten up email rules, third-party From: headers are now mostly bounced.  I had the same issue with mine.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga Contact PHP not working
« Reply #4 on: December 20, 2024, 08:43:45 AM »
Still not working.  I even changed my email address back to my forwarder bismarckweather.net account.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9722
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Contact PHP not working
« Reply #5 on: December 20, 2024, 08:56:12 AM »
You need to test your mail() function's connection to your outbound mail engine.

Try using the following script (script name not important)
Quote
<?php
error_reporting(E_ALL);
ini_set('display_errors','1');

$msg = "Test of email output\n";

$to = "you@yoursite.com"; // <== change to your email address

$state = mail($to,'Outbound mail test',$msg,"Reply-to: $to");

print $state?"Mail to '$to' accepted.":"Mail to '$to' FAILED.";

Tthat will show if your PHP/website mailer is correctly configured.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga Contact PHP not working
« Reply #6 on: December 20, 2024, 09:23:29 AM »
https://www.bismarckweather.net/phpmailtest.php

Mail to 'bw@bismarckweather.net' accepted.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Saratoga Contact PHP not working
« Reply #7 on: December 20, 2024, 09:27:44 AM »
I did just test my forwarder email address.  So that bw@bismarckweather.net is forwarding to my ISP email.  So at least I know that part is working.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

 

anything