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.
Feature/Change EmailMessage Parameter to Pointer in EmailSender Interface for Efficiency
Description
This pull request introduces an enhancement to the EmailSender interface by modifying the SendEmail method to accept a pointer to EmailMessage rather than passing the struct by value. This change improves efficiency by avoiding the unnecessary copying of the EmailMessage struct, particularly when dealing with larger messages or attachments.
Related Issue: Closes #12
Type of Change:
New feature (non-breaking change which adds functionality)
Checklist
Please ensure the following guidelines are met:
[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 change refactors the EmailSender interface to improve performance by passing a pointer to EmailMessage in the SendEmail method. Tests have been updated and added to ensure the functionality remains consistent and efficient. The documentation has been updated to reflect this change.
Feature/Change EmailMessage Parameter to Pointer in EmailSender Interface for Efficiency
Description
This pull request introduces an enhancement to the
EmailSender
interface by modifying theSendEmail
method to accept a pointer toEmailMessage
rather than passing the struct by value. This change improves efficiency by avoiding the unnecessary copying of theEmailMessage
struct, particularly when dealing with larger messages or attachments.Checklist
Please ensure the following guidelines are met:
type(scope): description
.Additional Information
This change refactors the
EmailSender
interface to improve performance by passing a pointer toEmailMessage
in theSendEmail
method. Tests have been updated and added to ensure the functionality remains consistent and efficient. The documentation has been updated to reflect this change.