Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Windows: Critical error The registration confirmation email can't be send!  (Read 21787 times)

0 Members and 1 Guest are viewing this topic.

RBiZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

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.




Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

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


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?
Logged

RBiZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

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.


Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I am not sure how to test sending emails with PHP's mail() function
http://www.php.net/manual/en/function.mail.php


Could not instantiate mail function.
It seems that sendmail isn't installed or configured on your system. Please contact your hosting provider.
Logged

RBiZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

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 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.
Logged

RBiZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

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.
Logged

RBiZ

  • Coppermine newbie
  • Offline Offline
  • Posts: 5

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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Please
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.
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.