Suitecrm: 7.11 system sent email without attachments

Created on 18 Jan 2019  路  5Comments  路  Source: salesagility/SuiteCRM



Issue


Maybe has something similary with issue #5552

If you sent new email with attachments, you'll receive email without attachments

Expected Behavior


Should send attachments in email

Actual Behavior


Steps to Reproduce


  1. Go to emial module
  2. Compose Email
  3. Add attachments
  4. Send email

Your Environment

  • SuiteCRM Version used:
  • Browser name and version Chrome Version 71.x
  • Environment name and version MySQL 5.6, PHP 7.3
  • Operating System and version Win 10
Emails Critical Fix Proposed Bug

All 5 comments

after upgrade to 7.11 receive email without attachments for email templates, send like pdf from invoices module

@Dillon-Brown i can confirm that email module in 7.11 doesn't send any attachment.. don't matter if compose email, email template, schneduled reports, documents and any other modules which want send attachment/attachments.

It's very critical issue which make again the email module unusable at all. I hope that somebody skilled find soon issue.

I want ak @Abuelodelanada @connorshea @ApatheticCosmos if should in your free time look on it and help fix this problem.

Hi,

I know there are some other threads, I鈥檝e checked the Email.php and it has the above already implemented, however I鈥檓 still unable to send emails with attachments.

https://github.com/salesagility/SuiteCRM/pull/6938 Mentions this as well

Upgraded from 7.10x to 7.11.6

Edit1:
Looks like the latest thread is https://github.com/salesagility/SuiteCRM/issues/6968

Sorry for the unneeded bump :(

Edit2: with a fix in progress https://github.com/salesagility/SuiteCRM/pull/7154

I've tried 7154 and it still is not working. Cannot send any email with an attachment in 7.11.6

Edit3:

Error from log: Mon Jul 22 18:53:11 2019 [25722][2e3113ac-2495-b08e-09f2-5b64c183f9cf][FATAL] SugarPHPMailer encountered an error: Could not access file: upload/4408ca97-f4d4-6292-631b-5d3668f3a145

Edit4:

I don't see an 'upload' folder in my directory /suitecrm/htdocs/

Is that the right location? I added it but nothing changed, thinking maybe its missing?

EDIT 5 BINGO BABY

I am sorry I'm a total noob but I hope this helps.

I was testing multiple issues, mainly what I gathered was the CRM was not including the file. At first I thought my upload folder was missing (which it was), however adding it with CHMOD 775 didn't help.

I kept seeing "notes" being used in the code, so I figured something was with that, turns out CRM attaches things as "notes" - makes sense!

I saw all of my "attachments" incl. failed ones in the notes section. So I opened up an attachment, and on the detailed view page, instead of opening the PDF I right click'd and looked at the GUID name. bunch-ofst-ufff-here-3439232323

_Ok well then where is this file, why is it failing to email?_

"find / -name enterfullGUIDnamehere"

Boom, its under suitecrm/htdocs/a425-upload

I quickly check that by going to www.xyz.com/a425-upload and thankfully its forbidden.

So then I go and change lines 1235, 3031, etc... from the above instructions to write a425-upload/

FIXED

Could someone take a look at this and see what is going on? I am using a bitnami install if that makes a difference.

Trying to fix email attachments bug. Email attachments were not being send. The issue was that attachments were being saved in a funky directory, but the Emails.php code was looking for the attachments in the "upload" directory.

The steps below, fixes this and attachments are being along with the emails now.

Chante the setting for the upload_dir via the config_ovwerride.php file
$sugar_config['upload_dir'] = 'upload/';

In the config.php this was set to

'upload_dir' => '5287-upload/', # at close to line 459
The '5287-upload' will vary with how your system was installed.

Ensure that the upload directory exists (create it if you need to). Also set the permissions to a+rw (chmod -R 755)

For some weird reason Bitnami adds those numbers to the upload folder. SuiteCRM will never work well with this unless the $sugar_config['upload_dir'] setting is correctly made.

But I believe there are also a couple of bugs that make unconventional upload folder names break some parts of the code...

Was this page helpful?
0 / 5 - 0 ratings