Announcement

#1 2021-09-12 18:17:45

monosabio
Member
2021-09-12
6

Update PHPMailer

After having some issues sending Notifications to users I've decided to update PHPMailer to the latest version:
Here are the steps:

1) Update latest version of PHPMailer:
Downlaod phpmailer from https://github.com/PHPMailer/PHPMailer
(Zip file https://github.com/PHPMailer/PHPMailer/ … master.zip)
Extract and copy all files from src folter to /include/phpmailer/


2) Modify /include/functions_mail.inc.php

Replace lines 614 to 617:

  include_once(PHPWG_ROOT_PATH.'include/phpmailer/class.smtp.php');
  include_once(PHPWG_ROOT_PATH.'include/phpmailer/class.phpmailer.php');

  $mail = new PHPMailer;

and change by
 
  include_once(PHPWG_ROOT_PATH. 'include/phpmailer/PHPMailer.php');
  include_once(PHPWG_ROOT_PATH. 'include/phpmailer/SMTP.php');
  include_once(PHPWG_ROOT_PATH. 'include/phpmailer/Exception.php');
 
  $mail = new PHPMailer\PHPMailer\PHPMailer();
 
 
 
3) Google Setup (Applies to Google GSuite or Gmail

Enable App Password:

https://medium.com/@kumardeepak.xyz/how … c66332a017



4) Modify /local/config/config.inc.php


$conf['smtp_host'] = 'smtp.gmail.com:587';
$conf['smtp_user'] = 'ENTER YOUR GOOGLE ACCOUNT EMAIL';
$conf['smtp_password'] = 'ENTER YOUR APP PASSWORD HERE';
$conf['mail_sender_email'] = 'ENTER YOUR GOOGLE ACCOUNT EMAIL'';
$conf['mail_allow_html'] = true;
$conf['smtp_secure'] = tls;



I'm getting the following warning but at least now it works:

Warning: Cannot modify header information - headers already sent by (output started at /include/functions_mail.inc.php:937) in /include/page_header.php on line 94

Offline

 

#2 2021-09-12 21:06:22

erAck
Only trying to help
2015-09-06
2026

Re: Update PHPMailer

> Warning: Cannot modify header information - headers already sent

That usually means PHP generated some error or warning messages after the HTML headers were already sent that would interfere with the PHP to HTML output, so there might be something lurking you aren't aware of. Check your PHP error log or enable your show_php_errors config variable to temporarily display errors.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact