Not able to send big attachment files using mail tool

Hello
We are using the Mail client tool that comes with SuiteCRM so our users can send mails to contacts. We have configured the SMTP and IMAP correctly and we are able to send and receive mails with no issue.

The problem comes when we try to add an attachment to the mail that is bigger than 4 MB. In this case the mail does not arrive and we can see this error in the log file

User XXXX attempted to send an email using incorrect email account settings in which they do not have access to.

We have checked the Mail configuration in the Admin panel, the config properties in the config.php file have the property max_uploadsize set to 30000 and in php.ini max upload size is set to 80MB.

Is this a problem with the configuration of the size of files a mail can have? if so, where can we change this settings?

Thanks a lot

I am not sure, but I think that message can be a bit misleading and you might be simply getting an SMTP error (server rejecting your large attachment).

You can do some useful debugging with this technique:

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/16507-mail-stopped-working-error-smtp-connect-failed

Hi, thanks a lot for the answer

I have taken a look to the post you sent in the answer, and will have to read it again carefully, however I am not sure if this is a similar issue.

If we send the mail to a mail address including an attachment less than 4MB it works with no issues, however if the attachment is higher then the error occurs. We have tried to do the same connecting to the SMTP server using another mail client like Thunderbird, and it works fine sending files biger than 10MB.

Seems that the issue is related to the SuiteCRM mail client, or any configuration we have set, but dont know where.

Cheers

Hi there

None had this problem or can give us a direction where to look for a solution?

Thanks a lot in advance!

The new versions already include that code I posted above, so when you do a SMTP test you can check a detailed server log.

You might have to add your attachment “manually” in PHP for your test, since the “Send test email” function doesn’t use attachments.

Look here:

https://github.com/salesagility/SuiteCRM/blob/master/include/SugarPHPMailer.php#L440

Add something like this there before the send:

$this->addAttachment($filepath);