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

feat(EmailMessage): change EmailMessage parameter to pointer in EmailSender interface for efficiency. #14

Closed JRocabruna closed 4 months ago

JRocabruna commented 4 months ago

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.

Checklist

Please ensure the following guidelines are met:

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.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Flag Coverage Δ
unittests 91.66% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.