darkrockmountain / gomail

GoMail is a powerful library for sending emails via multiple providers, including SMTP, Gmail API, Microsoft Graph API, SendGrid, AWS SES, Mailgun, Mandrill, Postmark, and SparkPost. Supporting attachments, plain text, and HTML content, it simplifies email integration for developers with easy setup and robust functionalities.
https://darkrockmountain.com
Apache License 2.0
4 stars 1 forks source link

[FEATURE] - Implement Maximum Attachment Size for Email Messages #11

Closed JRocabruna closed 13 hours ago

JRocabruna commented 1 month ago

Is your feature request related to a problem? Please describe. At present, there is no mechanism to restrict the size of attachments in the EmailMessage struct within the gomail package. This lack of restriction can result in issues when large attachments exceed the size limits set by email providers, leading to email delivery failures. Users currently have no control over the maximum size of attachments, which can cause frustration when emails fail to send without clear reasons.

Describe the solution you'd like The proposed solution is to introduce a feature that allows setting a maximum size for attachments in EmailMessage instances. This feature would include the following components:

Describe alternatives you've considered An alternative approach would involve users manually checking the size of each attachment before adding it to an EmailMessage. However, this method requires additional effort from users and is less efficient compared to having an integrated solution within the library.

Additional context Implementing this feature will enhance the usability and reliability of the gomail package by preventing large attachments from causing email delivery failures. It aligns with best practices for email transmission and assists users in avoiding common issues. The implementation will include thorough testing to ensure the feature functions as intended and does not introduce any regressions.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.