Author Topic: WXContact appears to not work on GoDaddy dedicated Mail Server. **SOLVED**  (Read 286 times)

0 Members and 1 Guest are viewing this topic.

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
http://weather.azkiwis.net

I am  using GoDaddy as my hosting site.
I'm having a bit of a problem with my 'contact' (wxcontact.php) scripts working.

It seems to have started in December last year when I switched to a C-panel setup for my website, and, at about the same time switched from using the mail function associated with the old linux-based hosting, to the dedicated mail server they offered.

Symptoms are as follows. 

In the old setup, to send webmaster etc an email, you'd click on contact us, fill it in, the routine would tell me it was sent, and bingo, it'd show up in my mail box.

In the new setup, with the 'dedicated' mail server, the wxcontact.php appears to work the same, the fill-in data, and sent msgs from wxcontact, but.... No email appears to be sent.
I'm fairly certain it's an issue with GoDaddy, either with the way I have things setup, or that the GoDaddy server does not allow this, or ??? with the sever setup.

I don't know enough etc to be able to discuss this with go-daddy  tech support, without knowing the real issues, problem etc, so I'm hoping that a fellow go daddy user or some one whose more technically competent than I am, will take a bit of a look at it.  If you can identify a problem and a fix - that'd be great, even identifying the problem would allow me to talk reasonably intelligently with tech support.

Thanks a bunch

Ken
(Cross posted in both forums)
« Last Edit: May 17, 2019, 12:15:04 PM by azkiwi »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7352
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
The contact form uses the built-in mail() function of PHP to send the message along.  It depends on having your PHP setup have the mail() function work correctly.

Call tech-support for GoDaddy and have them run a short email PHP script on your website and debug the results.  Also, check your error_log -- there may be clues about what's wrong in there.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
Thanks Ken...

I'll sign on to godaddy tonight (grand son duties coming up) and see what the php settings are and then get in touch with T/Support.

Greatly Appreciate your knowledge and help


Ken

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7352
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Try the following script on your site as a .php page:

Code: [Select]
<?php
header
('Content-type: text/plain;charset=ISO-8859-1');
#
# set the following to your destination email address
$to      'you@yoursite.com';
#
error_reporting(E_ALL);
ini_set('display_error','on');

# run the script with ?testit=y on the URL on your site
#
if(isset($_REQUEST['testit']) and $_REQUEST['testit'] == 'y') {


$subject 'Test of Email';
$message "This is a test of email from PHP mail() function.\r\n";
$headers 'From: '.$to "\r\n" .
    
'Reply-To: '.$to "\r\n" .
    
'X-Mailer: PHP/' phpversion();

$success mail($to$subject$message$headers);

print 
$success==true?"mail() reports success\n":"mail() reports FAILURE\n";


} else {
print "Email test not run.\n";
}
?>

Change the $to line to have your email address.  Upload the script to your site, then run it with ?testit=y on the URL.

It should return with either
Quote
mail() reports success
for a success (and you should see a message with
Quote
This is a test of email from PHP mail() function.
in the contents.

If it shows something else, you should see any PHP error messages like
Quote
<br />
<b>Warning</b>:  mail(): Failed to connect to mailserver at &quot;localhost&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in <b>C:\xampp\htdocs\test-mail.php</b> on line <b>21</b><br />
mail() reports FAILURE
and that can give you a clue about what might be wrong with the mail() setup with your hoster.

The ?testit=y is there just to (hopefully) forstall any bots from trying to spam you via the page (even though they wouldn't be able to generate custom content).

Have the hoster tech support try it to help with their debugging.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
Spent way more time than I planned to, digging around GoDaddy's Cpanel setup..  Way more confusing that I thought it would be/ than possible...
Waited for godaddy a bit, heavy call volume; explained to staff the issue, agreed that it was 'probably' the mail  bit wasn't turned on in php parms.  Showed me how to do it... Made the change... Waited 30 minutes and tried it... Routine reported success.. but no email... Used your testit routine, it also showed success, but again no email.
Sooo..... later this evening I'll get with godaddy again and see what they can find....

oh, side question, any idea if / where /etc i can turn on or find the log files?  I'm a bit of a lost soul in digging in thsi....


thanks Ken for you hep

(another) Ken

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
Just occurred to me.... The mail address to which the contact.php is trying to send the message to is an addy that's on the Email server with all the others.  There is no email address under / associated with the azkiwis.net domain. Could this be the issue?


(other) Ken

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7352
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
With GoDaddy cPanel, you can use the Raw Metrics, Errors to browse the last 300 entries in error_log.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
Another Question for you.....

Before I call godaddy this morning, I've been looking thru the 2 contact.php routines. Was looking for the email address to send to (my station's email) - but I couldn't find it anywhere.

Do you know where the routines get it from?  jut want to verify that it's correct.

Thanks

ken

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7352
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
That would be your email address (same one you used to register for the forum) -- that way, a message will come to you.

Definitely use the test email script .. easier for the tech support folks to follow.

In the test script above is
Code: [Select]
# set the following to your destination email address
$to      = 'you@yoursite.com';

replace the you@yoursite.com with a valid email address that you use to receive email.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline azkiwi

  • Contributor
  • ***
  • Posts: 146
    • Maricopa, Sonoran Desert, Arizona
Solved!! in about 5 minutes this morning with a call to GoDaddy. 
Because I use the Unlimited Email package, it's a different "exchanger" from the  web hosting. Okay, something that.

Was Solved in Cpanel

Went to the Email options etc in Cpanel 

selected Email Routing

Selected the affected domain (in my case azkiwis.net)

Selected the Remote Mail Exchanger button

Saved settings

Waited 5 minutes and did a test -  Yahoo - it worked!


Ken - Many thanks for helping me figure all this out.