HomeAdmin ManualEmail Setup and TroubleshootingHandling Large Email File Attachments

1.11. Handling Large Email File Attachments

To properly handle large file attachments it is often necessary to modify settings in your HelpSpot, PHP.ini file and database configuration.

HelpSpot Settings

Admin->Settings->Email Integration->Max Attachment Size - This defaults to 10mb. If you need to handle larger sizes, you'll first need to increase this setting.

PHP.ini Values to Review

memory_limit - PHP may require more memory to import large files then it has available. Increasing this value will give PHP more memory to use. 60mb has proven to be a good value for this variable if you want to handle attachments up to about 10mb.

max_execution_time - The time PHP has to execute a script. If you're downloading large files from across the internet, you may need more time.

upload_max_filesize - The maximum size a file upload can be. This affects files staff try to upload to attach to emails.

post_max_size - The maximum size an HTTP POST request can be, this can limit the maximum size a file can be when uploading files to attach to emails.

upload_tmp_dir - The directory uploaded files are temporarily stored in during transmission. If no attachments of any size are able to be uploaded then this value may be unset or set to a directory which is not writable by the web server.

Database Settings

MySQL: max_allowed_packet - On MySQL, increase the max packet size to greater than the biggest files you expect to handle. This is done in the MySQL configuration file. See your MySQL documentation for specific instructions for your version.

IIS Settings

IIS has a maximum content length setting that can affect the ability to upload / attach files. Here's how you can check that:

  1. Open IIS Manager.
  2. Select the website that you want to configure.
  3. Make sure you are in Features View per the button at the bottom of the manager.
  4. Select Requests Filtering and open it by double-clicking the icon. The Request Filtering pane displays.
  5. From the Actions pane on the right hand side of the screen click Edit Feature Settings... link. The Edit Request Filtering Settings window displays.
  6. In the Request Limits section, enter the appropriate Maximum allowed content length (Bytes) and then click the OK button.
  7. Restart IIS.

NGINX Settings

NGINX has a client_max_body_size that can prevent larger attachments if the value is set too low.

 

Knowledge Tags

This page was: Helpful | Not Helpful