forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 email => Topic started by: artman1913 on August 31, 2022, 04:11:02 am

Title: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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

Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: ron4mac 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.
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 on August 31, 2022, 04:44:57 am
Yes it is

YABB and my PHP code sends fine
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: ron4mac 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.
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 on August 31, 2022, 07:08:33 pm
FYI
YABB uses that same email address to send stuff and it goes though.
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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.
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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);
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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.
Title: Re: email with 1.6.19 and PHP 8.0.17
Post by: artman1913 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.