Windows: Critical error The registration confirmation email can't be send! Windows: Critical error The registration confirmation email can't be send!
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Windows: Critical error The registration confirmation email can't be send!

Started by RBiZ, August 10, 2012, 07:14:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RBiZ

Critical error
The registration confirmation email can't be send!
Critical error
The password reminder email can't be sent!
I am using a Hostgator Personal Windows account, and am receiving the error message when i try to register a new user. I have tested many things, including leaving the smtp host blank, entering localhost, and entering the smtp hostname (the username (email address) & password fields are filled in with a working email on the server). After much testing, I went into the code in mailer.inc.php and changed from:
var $SMTPAuth     = false; to var $SMTPAuth     = true; since I believe that Hostgator requires authentication. This also did not work.

I found a post that may be a solution from September 2010 http://forum.coppermine-gallery.net/index.php/topic,66826.0.html , however it looks like the code in mailer.inc.php has been modified since then (Reply #15) so I did not attempt to modify my file that code.





Αndré

According to that post, try to change
ini_set('sendmail_from', $this->Sender);
to something hard-coded as orb353 did.


Quote from: RBiZ on August 10, 2012, 07:14:12 AM
I went into the code in mailer.inc.php and changed from:
var $SMTPAuth     = false; to var $SMTPAuth     = true; since I believe that Hostgator requires authentication. This also did not work.
There's no need to change that line. As far as I can see it won't be used at all.


Does sending emails with PHP's mail() function work? What's the error message with Coppermine's debug mode enabled?

RBiZ

Here are my errors in debug mode.
I am not sure how to test sending emails with PHP's mail() function

When smtp.bestfriendsvethospital.com is entered in SMTP HOST

\include\mailer.inc.php
•   Warning line 2114: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: No such host is known.
•   Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to smtp.bestfriendsvethospital.com:25 (php_network_getaddresses: getaddrinfo failed: No such host is known. )
•   CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.



When SMTP HOST is left empty –
Listed in error is: register.php - Line: 627

include\mailer.inc.php
•   Warning line 588: mail() [function.mail]: SMTP server response: 550 <lakespyder@gmail.com> No such user here
•   CPG Notice line 1695: Could not instantiate mail function.



When localhost is entered in SMTP HOST

\include\mailer.inc.php
•   Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )
•   CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.



When SMTP HOST is left empty and I hardcoded the change below:
    if ($this->Sender != '' && strtolower(ini_get('safe_mode')) != 'on' && ini_get('safe_mode') != 1) {
      $old_from = ini_get('sendmail_from');
      //ini_set('sendmail_from', $this->Sender);
       ini_set('sendmail_from',"vet@bestfriendsvethospital.com");

\include\mailer.inc.php
•   Warning line 590: mail() [function.mail]: SMTP server response: 550 <ra@rbizmarketing.com> No such user here
•   CPG Notice line 1697: Could not instantiate mail function.



Αndré

Quote from: RBiZ on August 10, 2012, 07:13:14 PM
I am not sure how to test sending emails with PHP's mail() function
http://www.php.net/manual/en/function.mail.php


Quote from: RBiZ on August 10, 2012, 07:13:14 PM
Could not instantiate mail function.
It seems that sendmail isn't installed or configured on your system. Please contact your hosting provider.

RBiZ

I am using a Hostgator Personal Windows account -
Here is what support at Hostgator says:
As far as sendmail being installed; You are on shared hosting environment and any application must use SMTP Authentication in order to send emails

Αndré

Quote from: RBiZ on August 10, 2012, 07:13:14 PM
When smtp.bestfriendsvethospital.com is entered in SMTP HOST

\include\mailer.inc.php
•   Warning line 2114: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: No such host is known.
•   Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to smtp.bestfriendsvethospital.com:25 (php_network_getaddresses: getaddrinfo failed: No such host is known. )
•   CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.


Quote from: RBiZ on August 10, 2012, 07:13:14 PM
When localhost is entered in SMTP HOST

\include\mailer.inc.php
•   Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. )
•   CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.


You have to enter valid SMTP data: smtp.bestfriendsvethospital.com doesn't exist and there's no SMTP server running at localhost.

RBiZ

The other forms (after much work due to the strict settings for hostgator windows hosting) work using CDO with this configuration (I had to use localhost to get it to work properly):
Sub SubmitEmail(strForm)
   Set objConfig = CreateObject("CDO.Configuration")
   Set Fields = objConfig.Fields

   With Fields
    .Item(cdoSendUsingMethod)       = 2
    .Item(cdoSMTPServer)            = "localhost"
    .Item(cdoSMTPServerPort)        = 25
    .Item(cdoSMTPuseSSL)            = False
    .Item(cdoSMTPConnectionTimeout) = 60
    .Item(cdoSMTPAuthenticate )     = 1
    .Item(cdoSendUserName)          = "vet@bestfriendsvethospital.com"
    .Item(cdoSendPassword)          = "password"
   
***********
This is why I thought i may need to modify the $SMTPAuth setting. I have also tested with it set as  var $SMTPAuth     = 1;
Still no luck.

RBiZ

Hostgator finally was able to get it working using: mail.url.com rather than smtp.url.com or localhost
I am not sure if they made any other modifications.
Thanks for your assistance!

Αndré

Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.