Email with attachments over 500kb won't be received (again)
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
This discussion has been closed.
Comments
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
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...
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
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 ?
Hi @mediana,
You're welcome!
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