• First I would like to thank you for your great plugin.

    I’m trying to create a form with “Contact Form 7” plugin that sends an email with uploaded files as attachments.

    I receive the following error on WordPress admin panel when the attachment is larger than 5 mb. I can send attachments slightly smaller than that. This error also happens when I try to send, for example, 2 attachments each 3 mb.

    —–

    EMAIL DELIVERY ERROR: WP Mail SMTP plugin logged this error during the last time it tried to send an email:

    Mailer: Gmail

    Request Entity Too Large

    Request Entity Too Large
    Error 413

    Please review your WP Mail SMTP settings in plugin admin area. Consider running an email test after fixing it.

    —–

    I tried to change the file size limit in .htaccess by adding:

    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    php_value max_execution_time 600
    php_value max_input_time 600

    in addition to php.ini by adding:

    memory_limit = 128M
    upload_max_filesize = 128M
    post_max_size = 128M

    in addition to my theme’s functions.php by adding:

    @ini_set( ‘upload_max_size’ , ‘128M’ );
    @ini_set( ‘post_max_size’, ‘128M’);
    @ini_set( ‘max_execution_time’, ‘300’ );

    I’m running WordPress 4.9.7, WP Mail SMTP 1.3.3, Contact Form 7 5.0.3 on a Debian GNU/Linux 9 (stretch) VPS.

    I have followed https://wpforms.com/how-to-securely-send-wordpress-emails-using-gmail-smtp/ to configure WP Mail SMTP.

    1. I can use the form to upload and email files as attachments up to 5 mib
    2. When I try to choose a file larger than 5 mib:
    2a. I see this error on “Contact Form 7”: “One or more fields have an error. Please check and try again.”
    2b. I see WP Mail SMTP plugin error mentioned above on WordPress admin panel.
    2c. I can confirm that files larger than 5mb are uploaded to the server using “Contact Form CFDB7”.

    I am using Google’s G Suite and I can send larger attachments using the web browser.

    I’m stuck right now, I would really appreciate any hint, thanks.

  • The topic ‘Gmail Request Entity Too Large Error 413’ is closed to new replies.