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.
This pull request introduces custom sanitizers for text and HTML content within the EmailMessage struct. Users can now specify their own sanitization logic or utilize the default sanitizers provided. This enhancement improves flexibility and security in email content handling. The changes also include comprehensive tests to ensure robust functionality and edge case coverage.
Related Issue: Closes #32
Type of Change:
New feature (non-breaking change which adds functionality)
This change requires a documentation update
Checklist
[x] The code follows the style guidelines of this project.
[x] A self-review has been performed on the code.
[x] The code is well-documented, and comments have been added where necessary.
[x] Tests have been added to prove that the fix is effective or that the feature works. All existing tests pass.
[x] Commit messages follow the convention type(scope): description.
[x] The pull request has no conflicts with the base branch.
[x] Any dependent changes have been merged and published in downstream modules.
Additional Information
This update includes:
Custom sanitizer methods: SetCustomTextSanitizer and SetCustomHtmlSanitizer.
Enhanced tests covering new functionalities and edge cases.
Updated documentation to reflect the new sanitization capabilities.
Description
This pull request introduces custom sanitizers for text and HTML content within the
EmailMessage
struct. Users can now specify their own sanitization logic or utilize the default sanitizers provided. This enhancement improves flexibility and security in email content handling. The changes also include comprehensive tests to ensure robust functionality and edge case coverage.Checklist
type(scope): description
.Additional Information
This update includes:
SetCustomTextSanitizer
andSetCustomHtmlSanitizer
.