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

Open
opened 2026-02-20 16:28:38 -05:00 by deekerman · 2 comments
Owner

Originally created by @car1inux on GitHub (Jul 19, 2023).

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

  • SuiteCRM Version used: 7.13.4
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): All
  • Environment name and version (e.g. MySQL, PHP 7): PHP 7.4.33
  • Operating System and version (e.g Ubuntu 16.04): CentOS Stream 8
Originally created by @car1inux on GitHub (Jul 19, 2023). #### 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 <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.13.4 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): All * Environment name and version (e.g. MySQL, PHP 7): PHP 7.4.33 * Operating System and version (e.g Ubuntu 16.04): CentOS Stream 8
Author
Owner

@johnM2401 commented on GitHub (Aug 4, 2023):

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

@johnM2401 commented on GitHub (Aug 4, 2023): 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](https://github.com/salesagility/SuiteCRM/assets/13675281/1eba3ab1-1f58-4909-847d-246465509dfd) If I then send a new PDF via Contract->Email PDF action, a new item appears: ![image](https://github.com/salesagility/SuiteCRM/assets/13675281/d2f22a57-8062-42d0-909f-454acdde046e) As well as seeing it in my Email client: ![image](https://github.com/salesagility/SuiteCRM/assets/13675281/aec51085-2ad7-4371-889e-5c9e407da974) 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
Author
Owner

@car1inux commented on GitHub (Aug 4, 2023):

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

@car1inux commented on GitHub (Aug 4, 2023): 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](https://github.com/salesagility/SuiteCRM/assets/139999689/9150ad80-5de3-41c4-86e6-0f804859d735)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#5043
No description provided.