So I have made this php script (Using PHPMailer) that collects lead and send an automated mail with a PDF File as Attachment.
The Problem is the script works for small sized Files. But the client has provided me to send a PDF file of the size 24,139 KB.
So I Increased the memory_limit to 128M since memory was exhausted earlier (64M Earlier). The script now works fine without an error but I don't recieve any mail with this large file
Does mail providers such as Gmail,Yahoo etc blocks large attachments?? If so could someone tell me what is the maximum size, so that i could ask my client to limit the PDF size
Any Help?? Sharan
It can take quite a lot of memory to encode large files in memory, so increasing memory_limit is the right thing to do there.
The maximum message size an SMTP server will accept is often given in the response to the EHLO command. There is a ticket open for this in PHPMailer, but as yet it doesn't support it automatically.
Bear in mind that binary files need base64 encoding, which increases file size by about 1/3.
To see exactly why you are failing to deliver your message, set $mail->SMTPDebug = 3; and you will see the SMTP conversation. Failing that, check the ErrorInfo property after sending, or your local mail server logs if you are not sending via SMTP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With