salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.5k stars 2.09k forks source link

"Send PDF via email" only send the email without the attached PDF #10121

Open car1inux opened 1 year ago

car1inux commented 1 year ago

Page with Issue

http://mywebsite/index.php?module=AOS_Contracts&action=DetailView&record=9c2c08e1-2cf8-f9f2-82a3-6363efb0cd17

What is wrong, less clear, or missing

SugarPHPMailer encountered an error: Could not access file: upload/d847a76e-89b7-567d-48fa-64b8129219e8 because the file is saved in the root directory instead of /upload

Proposed fixes and/or additions

Please add "/" in the filename between "upload" and the filename

Your Environment

johnM2401 commented 1 year ago

Hey!

Thank you for getting in touch.

I've given this a try, but I can't seem to replicate I'm afraid.

For example, I have a few items in the Upload directory: image

If I then send a new PDF via Contract->Email PDF action, a new item appears: image

As well as seeing it in my Email client: image

Would you perhaps have any specific steps to replicate this issue?

I would recommend checking that your CRM's file/folder permissions are set correctly As well as ensuring your CRM's site_url (in config.php) is correct And ensuring that your .htaccess has the correct RewriteBase

car1inux commented 1 year ago

Hi, I have this problem only when sending the PDF via mail starting from a Quote. In example I have no problem composing and sending a mail with attachments from scratch. This is how you can replicate:

  1. Open a Quote (module=AOS_Quote) in view mode
  2. From this page, send this Quote via email using the red button Actions / Email PDF
  3. Choose a template
  4. Now you are in the Email Composer page, with the PDF already attached, and you are about to send this mail to the Contact of such Quote
  5. Complete the fields and send. The mail is now sent.

The recipient received this email but without attachment. This is the PDF saved on the disk, but not in the /upload directory due to an error in the filename image