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: email with 1.6.19 and PHP 8.0.17  (Read 887 times)

0 Members and 1 Guest are viewing this topic.

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
email with 1.6.19 and PHP 8.0.17
« on: August 31, 2022, 04:11:02 am »


Not getting emails that Coppermine is sending.
Can anybody with close to my versions verify that email is working ?

All the pages seem to display correctly but the emails don't seem to be going out
Verified the YABB and some of my PHP code is sending emails just fine.

Only thing I have run across is a case issue (m/M) and my understanding this does not matter

from include/mailer.inc.php
        $mail = new cpg_PHPmailer();
class cpg_PHPMailer

Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1938
Re: email with 1.6.19 and PHP 8.0.17
« Reply #1 on: August 31, 2022, 04:34:11 am »

Your Coppermine gallery is okay (as long as you didn't make changes to it). It will send mail once you have your server (is it hosted?) and PHP configured properly to send email.
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #2 on: August 31, 2022, 04:44:57 am »

Yes it is

YABB and my PHP code sends fine
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 1938
Re: email with 1.6.19 and PHP 8.0.17
« Reply #3 on: August 31, 2022, 04:47:18 am »

Your host/server may also need to have CPG configured with an admin email address that is a valid user on the domain of your server.
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #4 on: August 31, 2022, 06:50:34 pm »

Hmm settings look to be good
Guess I will dig in and see what I can find
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #5 on: August 31, 2022, 07:08:33 pm »

FYI
YABB uses that same email address to send stuff and it goes though.
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #6 on: September 01, 2022, 12:35:03 am »

progress report

Looking at the headers of a email sent though YABB it look like the mail program the hosting company uses is https://www.exim.org/

Received: from XXXXX by justYYYY.justhost.com with local (Exim 4.95) (envelope-from <XXXXX@justYYYY.justhost.com>) id 1oTAqw-000xot-CI for artXXXX@gmail.com; Tue, 30 Aug 2022 17:41:06 -0600

I would assume it supports all the sendmail options so it should be transparent but you never know.
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #7 on: September 02, 2022, 03:21:54 am »

If I remove the headers when the php mail function is called it goes through no problem.

I will be digging in more to find a workaround but I don't see a need to update this anymore.

Thanks

Headers that would have been sent

Date: Thu, 1 Sep 2022 19:01:29 -0600
From: Titanium RV Owners Photo Gallery <jimoXXXXX@gmail.com>
Message-ID: <ac542bcd4e502e6d73a0f4865ed03e63@just2064.justhost.com>
X-Mailer: PHPMailer 5.2.21 (https://github.com/PHPMailer/PHPMailer)
MIME-Version: 1.0
Content-Type: multipart/alternative;
   boundary="b1_ac542bcd4e502e6d73a0f4865ed03e63"
Content-Transfer-Encoding: 8bit
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #8 on: September 02, 2022, 04:16:06 am »

Found it
function I put it in and my fix

   private function mailPassthru($to, $subject, $body, $header, $params)
   {
$header=str_replace("\n","\r\n",$header);
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #9 on: September 03, 2022, 07:10:25 pm »

So

Discussing with people if I am going to put this patch into production.

My concern is currently if coppermine gets updated any patch I put on will get removed.
Logged

artman1913

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: email with 1.6.19 and PHP 8.0.17
« Reply #10 on: September 03, 2022, 07:59:48 pm »

ok I have a different workaround but I like it less

I changed to smtp auth
But if the mail server is to busy to respond it will fail.
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 22 queries.