Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Email with attachments over 500kb won't be received (again)
  • Vote Up0Vote Down medianamediana
    Posts: 9Sendy user

    Hello Ben, Though marked as solved in 1.1.5 (http://sendy.co/discussion/539), I still experience the exact same issue on my brand fresh 1.1.5.3 setup. Hope this can be totally solved. Regards, Antoine

  • 5 Comments
  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    Hi @mediana,

    Yes someone reported the same thing to me via email.

    When I tested before release of 1.1.5 attachments over 500kb worked. I guess it's not about the file size.

    Can you PM me a link to download your attachment so that I can use it to troubleshoot?

    Thanks!

    Ben

  • Vote Up0Vote Down medianamediana
    Posts: 9Sendy user

    IMHO, it is related to file size. I have tested with standard PDF Files and also dummy text files created using the freeware 'Dummy File Creator'. In my case, a file of 566 Kb will be OK while 567 Kbytes files and over will fail whatever the files is. This file size may depends on the size of the email content, maybe. Again, sending a test will be OK, while sending the campaign will fail, tough considered as perfectly sent by SES and Sendy...

  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    Hi @mediana,

    I've found the issue and have fixed it. I've released version 1.1.5.4 that includes this fix and couple of others http://sendy.co/get-updated

    When emails are sent using curl_multi_* for multi-threaded sending, the emails are inserted into the queue table in the database. The email + attachment needs to be base64 encoded before transfer to Amazon SES. This base64 string can be huge especially if an attachment is attached and can go up to more than 1MB. When that happens, mySQL throws this error:

    The query length of xxx bytes is larger than max_allowed_packet size (1048576).

    This can be fixed by increasing the max_allowed_packet size by running a query. But you need to be logged in as the 'root' user of the database in order to do this. Users who are on shared servers will never be able to do this. There are also "not-so-technical" users using Sendy as well.

    So in order to fix this the bullet proof way, emails with attachments will not be sent using multi-threading. Without using multi-threading, emails will not need to be added to the queue table hence emails will be sent out as it should without errors. This also explains why sending a test email using the "Test email function" works but not when sending out the campaign for real previously as the test email function does not use multi-threading to send.

    Please download the update here → http://sendy.co/get-updated

    Thanks.

    Ben

  • Vote Up0Vote Down medianamediana
    Posts: 9Sendy user

    This is a great news ! Thank you Ben so much.
    I am currently sending a 2mb email to 1300 recipients. It takes 4-5 seconds per each, which is acceptable.

    Though, since I have root access to MySQL, wouldn't it be possible to keep multi-threading up to what max_allowed_packet allows ?

  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    Hi @mediana,

    This is a great news ! Thank you Ben so much.

    You're welcome!

    Though, since I have root access to MySQL, wouldn't it be possible to keep multi-threading up to what max_allowed_packet allows ?

    The code has been changed in a number of places, you can't just increase the max_allowed_packet size to "activate" multi-threading, the code has to be changed in all files that depends on each other. This is not doable as it will not work for every Sendy user as not all users have root access to the database.

    Thanks.

    Ben

This discussion has been closed.
All Discussions