Invoice is not attached to email due to problem to access private filesystem from phpmailer

Created on 12 April 2022, about 3 years ago
Updated 1 May 2025, 12 days ago

Problem/Motivation

PHPMailer\PHPMailer\Exception: Could not access file: private://14-es-pending.pdf en PHPMailer\PHPMailer\PHPMailer->addAttachment() (lรญnea 3173 de /home/mexii/public_html/vendor/phpmailer/phpmailer/src/PHPMailer.php)

Steps to reproduce

After finish checkout, mail is sent without attachment

Proposed resolution

commerce_invoice/src/Mail/InvoiceConfirmationMail.php line 96, set full path of file

'filepath' => \Drupal::service('file_system')->realpath($file->getFileUri()),

it works

๐Ÿ› Bug report
Status

Active

Component

Code

Created by

๐Ÿ‡ฒ๐Ÿ‡ฝMexico ropic

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024