I'm trying to send by mail a file of 10MB,first compress the folder (this does well and creates the zip file correctly), with small files no problem but this does not work but with a big file don´t work.
I try with SMTP llibrary and SMTPExtras
this is the code, thanks
B4X:
Dim smm As SMTPExtras
smm.Initialize("smtp.gmail.com","xxx@gmail.com","yyy","smtpp")
smm.UseSSL=True
smm.To.Add("xxx@gmail.com")
smm.Subject="Imagenes"
smm.Body="imagenes"
Arc.ZipFolder(File.DirRootExternal&"/images",File.DirRootExternal,"images.zip","comprimir")
smm.AddAttachment(File.DirRootExternal,"images.zip")
smm.Send
I know gmail has a 10gig file limit when using google drive.
Gmail's normal limit is 25MB
Also I have see problems with ZIP files. I am thinking that gmail de-compresses them to scan for viruses.
Maybe try renaming it to something else from a zip file?
With gmail you can send mails of up to 25mb in size. Please note that 10mb attachment creates a 13.5mb mail... so the maximum size should be approx 17mb or so...
Have you checked the logs for any errors (check the unfiltered logs as well)?
The SMTP object loads the entire file to memory and the converts it to base64 string (mail attachments are sent as strings). This means that a 10mb file will require 10 + 10 * 1.3 mb of available memory. After the file is written to the stream the memory is released.