You need to sign in to do that
Don't have an account?
Terence Viban
Email Attachment Sizes
HI All,
i am attaching files to an email that I send out form Apex code. I was reading the documentation of email file size limits and came across very conflicting statements. In the help section it is clearly written
"The size limit for multiple files attached to the same email is 25 MB, with a maximum size of 5 MB per file."
(https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_files_size_limits.htm)
But then I also find this in a couple of places
"The max email message size for a complete email message including attachments is 10MB"
(https://developer.salesforce.com/page/Force.com_Email_Services_Size_Limitations)
"Email Services: Maximum Size of Email Message (Body and Attachments):10MB"
"Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set)."
(https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm)
(https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_what_is.htm|StartTopic=Content%2Fapex_classes_email_inbound_what_is.htm|SkinName=webhelp)
My question is quite simple ... What limit should I care about if I intend to send attachments through email directly from the controller?
i am attaching files to an email that I send out form Apex code. I was reading the documentation of email file size limits and came across very conflicting statements. In the help section it is clearly written
"The size limit for multiple files attached to the same email is 25 MB, with a maximum size of 5 MB per file."
(https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_files_size_limits.htm)
But then I also find this in a couple of places
"The max email message size for a complete email message including attachments is 10MB"
(https://developer.salesforce.com/page/Force.com_Email_Services_Size_Limitations)
"Email Services: Maximum Size of Email Message (Body and Attachments):10MB"
"Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set)."
(https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_gov_limits.htm)
(https://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_classes_email_inbound_what_is.htm|StartTopic=Content%2Fapex_classes_email_inbound_what_is.htm|SkinName=webhelp)
My question is quite simple ... What limit should I care about if I intend to send attachments through email directly from the controller?
I understand your point. You are right. Looks like they expect the readers to know about Email Services (note the capital letters) before reading the limits docs.
Now, I too did some research and found the following. Hope this helps you to clarify the doubts.
- Attachment (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_attachment.htm)- "The maximum email attachment size is 3 MB."
- Please see the screenshot which clearly indicates that the oubound email attachment size should be less than 10 MB.
I would suggest you to try attaching a file which is, say, 12 MB and try sending the email, through code (or API or using SingleEmailMessage). If you get run time error, then you will know about the size limit. I can recollect I read once, if the size is more than 3 MB, the attachment is sent as a link in email. I do not know how big that attachment can be (my strong feeling is it cannot be more than 10 MB).Do let me know.
--
Abhi
If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted.
All Answers
In Salesforce, outbound emails can be sent - by clicking on Send Email button in Activity related list in a detail page, workflows, Apex Code (SingleEmailMessage, etc.). Inbound are received by Email to Case, Email to Salesforce, Email Services (Email services are automated processes that use Apex classes to process the contents, headers, and attachments of inbound email - https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_email_inbound_what_is.htm).
Now, if these are clear, please go through this link - https://help.salesforce.com/HTViewHelpDoc?id=limits_email_general.htm&language=en_US. It should clarify your doubts. If not, please let me know.
--
Abhi
If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted.
thanks for your response. I did not notice that the limits apply to Inbound and Outbound emails. In my opinion it is still not quite clear. If I read something like this "Email Services: Maximum Size of Email Message (Body and Attachments) : 25MB" how am I suppose to know if it applies to Inbound or Outbound emails?
I will send my Outbound emails throught Apex. This is a single email which will be sent to multiple email addresses. The user can optionally upload additional files from his computer and/or select attachments from the related record or even select documents from Salesforce folders he has access to. I dynamically compute the size of the uploaded or attached files such that I can let the user know if he is going to violet the lmit. Now all this works fine.
All I want is somewhere in the documentation which says "Email attachments allowed for outbound emails : 10MB" for instances.
I haven't found this anywhere and can only guess that the 25MB (attachments & email body) mentioned in the link you gave apply to outbound email.
Do you get my point? Once more thank for your assistance
Cheers
Terence
I understand your point. You are right. Looks like they expect the readers to know about Email Services (note the capital letters) before reading the limits docs.
Now, I too did some research and found the following. Hope this helps you to clarify the doubts.
- Attachment (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_attachment.htm)- "The maximum email attachment size is 3 MB."
- Please see the screenshot which clearly indicates that the oubound email attachment size should be less than 10 MB.
I would suggest you to try attaching a file which is, say, 12 MB and try sending the email, through code (or API or using SingleEmailMessage). If you get run time error, then you will know about the size limit. I can recollect I read once, if the size is more than 3 MB, the attachment is sent as a link in email. I do not know how big that attachment can be (my strong feeling is it cannot be more than 10 MB).Do let me know.
--
Abhi
If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted.
now that you mention it, I remember having noticed this on a project i worked on last year. If the attachment size is greater than 3MB, the attachments are sent as downloadable links.
As for the overall size, I will just find out by doing as you suggest but I agree with you that it would probably not be more than 10MB. I will update you when I verify it.
Thanks for taking the time to check out the infomation.
cheers
Terence
Regards,
Abhi.
Yes there is a limit from salesforce side for sending large size attachement.. Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately 10 MB (varies depending on language and character set). In case you are looking for a larger file attachment you can go for 3rd party storage server for storing the file content as well as sending them over the email with large size attachment.
Cloud Drop is One such App that is some what following the same logic in order to store any number and size of files that can be associated with any salesforce object with Rackspace server.It also allow user to send very large size file as email attachment to particular contact/lead record.
Please check the following link for more information:
https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003IzEDEA0
I understand the pain you are going through with the email attachments size. You can actually leverage MassMailer DOCS that lets you send email attachments natively from Salesforce without having to hit the salesforce file size limits or email body limits.
You can learn more about MassMailer DOCs to at docs.massmailer.io
You can install the app from the AppExchange Listing