Support » Plugin: WP Mail SMTP by WPForms » Email delivery issue – 501 Syntax error

  • Resolved softound



    We have emails not delivered due to this error: 501 Syntax error – line too long

    This email issue occurred when system sends email with PDF attachments using API only,
    only few email servers rejects the emails

    and we tried to investigated the issue with comparing other email libraries(PHPMailer), we found there is an issue in attachment string, Usually the PDF attachment converted into long string when send through emails

    When using API the PDF is converted into 559882 characters in single line, (more than 76 characters allowed by RFC 2822 section 2.1.1.), You can check the .eml file

    This issue 559882 characters in single line occur only when sending via, But this issue not occur when sending via default PHP email option in the plugin.

    So we modified the following file in Version 2.3.1 to fix the issue in our server

    Removed line: 'content' => base64_encode( $file ),
    Added line: 'content' => chunk_split(base64_encode($file), 76, "\r\n"),

    Please review the above changes and implement them in next version of the plugin.


Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.