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

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]

Main Menu

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

Started by orb353, August 28, 2010, 06:45:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

orb353

url orbconstruction.com/cpg/index.php
I just installed CPG 1.5. Install went fine. Configured everything in Admin control panel. The site is hosted by IX webhosting on a windows server. I first left smtp info blank. No email sent. I then changed to my domain mail server.
mail.orbconstruction.com   with correct user name and password. I get error page.
I also tried smtp.orbconstruction.com. It will not send registration emails, I get the error listed in tittle.

Also

\include\functions.inc.php

    * Notice line 184: Undefined index: dbcharset

\include\mailer.inc.php

    * Warning line 59: array_flip() [function.array-flip]: The argument should be an array
    * Warning line 59: strtr() [function.strtr]: The second argument is not an array.
    * Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to smtp.orbconstruction.com:25
    * CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.

\include\plugin_api.inc.php

    * Notice line 662: Only variable references should be returned by reference

Oliver

Nibbler

There is no SMTP server running at smtp.orbconstruction.com. There is one running at mail.orbconstruction.com, so that should work. Check Coppermine's error log to see what the SMTP error is.

orb353

\include\functions.inc.php

set up as mail.orbconstruction.com
I can log into horde with firefox into this account, using the username and password, that I also put into CPG.   

* Notice line 184: Undefined index: dbcharset

\include\mailer.inc.php

    * Warning line 59: array_flip() [function.array-flip]: The argument should be an array
    * Warning line 59: strtr() [function.strtr]: The second argument is not an array.
    * Warning line 2114: fsockopen() [function.fsockopen]: unable to connect to mail.orbconstruction.com:25
    * CPG Notice line 1695: SMTP Error: Could not connect to SMTP host.

\include\plugin_api.inc.php

    * Notice line 662: Only variable references should be returned by reference

Nibbler

Perhaps your host is blocking the outbound connection. You'll need to take it up with them.

orb353

I am chatting with ix webhosting, he said to change to blank, use sendmail, but use the username and password. Now it says the email was sent, but I do not receive it. I am still working with ix on their end. Any suggestions.

Thanks
Oliver

orb353

Nibbler,
I see that you registered, did you receive the confirmation email?

orb353

Ix webhosting created a test php  sendmail page. He dropped it into the cpg folder,for my domain, and it does send an email, and it gets picked up into my inbox. Coppermine still will not send the registration emails. I do not receive any error messages in coppermine, it just doesn't send them. The smtp fields are all set to blank.

Thanks
Oliver

ΑndrĂ©

Some time ago I had the same problem. The cause was that my webhost blocked specific domains as sender email address (gmail / google mail in my case). Please try to enter a different 'Gallery administrator email'.

orb353

I have tried all kind of stuff, OI could not get it send email, ecards or anything.
I eventually deleted  version 1.5 and uploaded 1.4- the stable version, and installed it. .Same exact deal. I tried all blank smtp setting, to use sendmail. It would not work. I used my dominan mail server. mail.orbconstruction.com  with my user and pasword, the same info i enter into other php mailers ,and outlook on my workstation machine. It still will not email registrations. With the smtp settings set my mail server it says


\register.php

    * Notice line 228: Undefined index: user_profile5

\include\mailer.inc.php

    * Warning line 1693: fsockopen() [function.fsockopen]: unable to connect to mail.orbconstruction.com:25
    * Warning line 1693: fsockopen() [function.fsockopen]: unable to connect to mail.orbconstruction.com:25

WHen the settings are left blank it does not give this message, the only notice it gives is
\register.php

    * Notice line 228: Undefined index: user_profile5

I changed the url address it is now
http://www.orbconstruction.com/pg/index.php

If someone wants to login and look at the settings
the login is orb
the password is 7777
this is the admin login.

sendmail should work. I chatted with IX webhosting last week and the tech wrote a little php sendmail page to test the sendmail function on the server. It worked correctly.this is the link to the test page.
http://www.orbconstruction.com/pg/mail_test_windows.php
It does send an email to at  oliver@sublime-salon.com

Thanks for the help.

Nibbler


orb353

<?php
// The message

$sendto = "oliver@sublime-salon.com";
$subject = "php mail test";
$message = 'Test message using PHP mail-from pg folder()';
$header = "From: webmaster@".$_SERVER["SERVER_NAME"]."\n";
$header .= "Content-Type: text/html; charset=iso-8859-1\n";

$message = 'Test message using PHP mail from pg folder()';
$subject='Test';
// Send

ini_set("sendmail_from","webmaster@".$_SERVER["SERVER_NAME"]);

if (mail($sendto,$subject,$message,$header))
{
echo 'Mail sent from pg folder!';
} else
{
echo 'Error! Mail was not sent.';
};

?>

orb353

Andre' ,
I have tried leaving everything blank, but I never get an ecard that was sent, or the registration email. I have tried it with my domain smtp server    mail.orbconstruction.com      with the user name and password. It then gives the error, Cannot connect to mail.orbconstruction.com:25   
The site is served on a windows server. I love the photogallery, I just want to work out the email issue. Any Ideas?
Thanks

orb353

This is the log using
mail.orbconstruction.com  as the smtp server.



USER:
------------------
Array
(
   [ID] => 48d3499582a05424763a8be0ff88131d
   [am] => 1
   [lang] => english
   [liv] => Array
       (
           [0] => 1
           [1] => 14
           [2] => 8
       )

)

==========================
USER DATA:
------------------
Array
(
   [user_id] => 1
   [user_name] => orb
   [groups] => Array
       (
           [0] => 1
       )

   [disk_max] => 0
   [disk_min] => 0
   [can_rate_pictures] => 1
   [can_send_ecards] => 1
   [ufc_max] => 3
   [ufc_min] => 3
   [custom_user_upload] => 0
   [num_file_upload] => 5
   [num_URI_upload] => 3
   [can_post_comments] => 1
   [can_upload_pictures] => 1
   [can_create_albums] => 1
   [has_admin_access] => 1
   [pub_upl_need_approval] => 0
   [priv_upl_need_approval] => 0
   [group_name] =>
   [upload_form_config] => 3
   [group_quota] => 0
   [can_see_all_albums] => 1
   [group_id] => 1
   [0] => 1
   [1] => 1
   [user_group] => 1
   [2] => YES
   [user_active] => YES
   [3] => orb
   [4] => 5fb474583cf544a581936bb742c429f9
   [user_password] => 5fb474583cf544a581936bb742c429f9
   [5] => 2010-09-09 15:23:07
   [user_lastvisit] => 2010-09-09 15:23:07
   [6] => 2010-08-31 13:07:33
   [user_regdate] => 1283278053
   [7] =>
   [user_group_list] =>
   [8] => oliver@orbconstruction.com
   [user_email] => oliver@orbconstruction.com
   [9] =>
   [user_profile1] =>
   [10] =>
   [user_profile2] =>
   [11] =>
   [user_profile3] =>
   [12] =>
   [user_profile4] =>
   [13] =>
   [user_profile5] =>
   [14] =>
   [user_profile6] =>
   [15] =>
   [user_actkey] =>
   [16] => orb
   [17] => oliver@orbconstruction.com
   [18] => 1283278053
   [19] =>
   [user_location] =>
   [20] =>
   [user_website] =>
)

==========================
Queries:
------------------
Array
(
   [0] => SELECT extension, mime, content, player FROM cpg14x_filetypes; (0.001s)
   [1] => select * from cpg14x_plugins order by priority asc; (0s)
   [2] => delete from `orb353_cpg`.cpg14x_sessions where time<1284063191 and remember=0; (0.001s)
   [3] => delete from `orb353_cpg`.cpg14x_sessions where time<1282857191; (0.001s)
   [4] => select user_id from `orb353_cpg`.cpg14x_sessions where session_id = 'a81f5f0cd2f1729aabd8baa333ec6af4' (0.001s)
   [5] => select user_id as id, user_password as password from `orb353_cpg`.cpg14x_users where user_id=1 (0.001s)
   [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `orb353_cpg`.cpg14x_users AS u INNER JOIN `orb353_cpg`.cpg14x_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0.001s)
   [7] => SELECT user_group_list FROM `orb353_cpg`.cpg14x_users AS u WHERE user_id='1' and user_group_list <> ''; (0.001s)
   [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (1) (0.001s)
   [9] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 (0.001s)
   [10] => update `orb353_cpg`.cpg14x_sessions set time='1284066791' where session_id = 'a81f5f0cd2f1729aabd8baa333ec6af4' (0s)
   [11] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 1 (0.001s)
   [12] => DELETE FROM cpg14x_banned WHERE expiry < '2010-09-09 17:13:11' (0.001s)
   [13] => SELECT * FROM cpg14x_banned WHERE (ip_addr='65.115.188.217' OR ip_addr='65.115.188.217' OR user_id=1) AND brute_force=0 (0s)
   [14] => SELECT *, user_name AS user_name,
                                                                               user_email AS user_email,
                                                                               UNIX_TIMESTAMP(user_regdate) AS user_regdate,
                                                                               '' AS user_location,
                                                                               '' AS user_website

                                                                               FROM  `orb353_cpg`.cpg14x_users WHERE user_id = '1' (0.001s)
   [15] => SELECT * from cpg14x_pictures WHERE pid='6'  (0.001s)
   [16] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' (0.001s)
   [17] => INSERT INTO cpg14x_ecards (sender_name, sender_email, recipient_name, recipient_email, link, date, sender_ip) VALUES ('orb', 'oliver@orbconstruction.com', 'oliver', 'oliver@sublime-salon.com',   'YTo5OntzOjI6InJuIjtzOjY6Im9saXZlciI7czoyOiJzbiI7czozOiJvcmIiO3M6Mjoic2UiO3M6MjY6Im9saXZlckBvcmJjb25zdHJ1Y3Rpb24uY29tIjtzOjE6InAiO3M6NzY6Imh0dHA6Ly93d3cub3JiY29uc3RydWN0aW9uLmNvbS9wZy9hbGJ1bXMvdXNlcnBpY3MvMTAwMDEvbm9ybWFsX3BhcmFsaWZ0MS5qcGciO3M6MToiZyI7czozOiJycnIiO3M6MToibSI7czo2OiJycnJycnIiO3M6MzoicGlkIjtpOjY7czoyOiJwdCI7czowOiIiO3M6MjoicGMiO3M6MDoiIjt9', '1284066791', '65.115.188.217') (0.001s)
)

==========================
GET :
------------------
Array
(
   [album] => 1
   [pid] => 6
   [pos] => 4
)

==========================
POST :
------------------
Array
(
   [sender_name] => orb
   [recipient_name] => oliver
   [recipient_email] => oliver@sublime-salon.com
   [greetings] => rrr
   [message] => rrrrrr
   [submit] => Send ecard
)

==========================
VERSION INFO :
------------------
PHP version: 4.4.9 - OK
------------------
mySQL version: 4.1.20-max-log
------------------
Coppermine version: 1.4.27(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.28 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 3.23.49
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .;c:\PHP4\pear | .;c:\PHP4\pear
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | phpcode@opentransfer.com | phpcode@opentransfer.com
sendmail_path | no value | no value
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 60 | 60
max_input_time | 60 | 60
upload_max_filesize | 32M | 32M
post_max_size | 32M | 32M
==========================
Page generated in 10.16 seconds - 18 queries in 0.015 seconds - Album set : ; Meta set: ;

Nibbler

You should change the phpcode@opentransfer.com to webmaster@orbconstruction.com and then keep the SMTP settings blank.

orb353

ini_set("sendmail_from","webmaster@".$_SERVER["SERVER_NAME"]);
or
ini_set("sendmail_from","webmaster@orbconstruction.com"]);



this needs to be inserted somewhere in the php code. I am not sure where to insert it replace current ini_set("sendmail_from"
Where should I put it?
Thanks
Oliver

orb353

I finally got it to work. The first time it runs the script it times out. After that it works perfectly every time.
I replaced the original php code with this in the mailer.inc.php  file
the bold is what I inserted

I replaced
ini_set("sendmail_from", $this->Sender);
with
ini_set("sendmail_from","webmaster@orbconstruction.com");


I then inserted
ini_set("sendmail_from","webmaster@orbconstruction.com");
            $params = sprintf("-oi -f %s", $this->Sender);

            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);
in the ELSE clause, so it has no choice but to send the email

* Sends mail using the PHP mail() function. 
     * @access private
     * @return bool
     */
    function MailSend($header, $body) {
        $to = "";
        for($i = 0; $i < count($this->to); $i++)
        {
            if($i != 0) { $to .= ", "; }
            $to .= $this->to[$i][0];
        }

        if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1)
        {
            $old_from = ini_get("sendmail_from");
           //ini_set("sendmail_from", $this->Sender);

      ini_set("sendmail_from","webmaster@orbconstruction.com");

            $params = sprintf("-oi -f %s", $this->Sender);
            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
                        $header, $params);
        }
        else



      $old_from = ini_get("sendmail_from");
       
      ini_set("sendmail_from","webmaster@orbconstruction.com");
            $params = sprintf("-oi -f %s", $this->Sender);

            $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header);


        if (isset($old_from))
            ini_set("sendmail_from","webmaster@orbconstruction.com");


        if(!$rt)
        {
            $this->SetError($this->Lang("instantiate"));
            return false;
        }

        return true;
    }

Nibbler

Please test with this version of mailer.inc.php without any modifications. Make sure webmaster@orbconstruction.com or something else at your domain is set as the gallery email in config.

orb353

Fatal error: Undefined class name 'inspekt' in D:\hshome\orb353\orbconstruction.com\pg\include\mailer.inc.php on line 1723

Nibbler


orb353

I started with 1.5, could not get it to email, so I deleted 1.5 and uploaded 1.4. That is the version I edited and was able to get to work. I really want to use 1.5. So, I just created another db for 1.5 version, and I am uploading files as we speak. I will stick the file I downloaded from you into 1.5, and see if it works.