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 addresses the issue where attachments in emails sent using the Microsoft 365 provider were improperly processed. The attachments were being encoded into Base64 strings and then converted into byte arrays, resulting in incorrect attachment data being sent. The fix ensures that attachments are sent using raw byte data, preserving their integrity.
Related Issue: Closes #45
Type of Change:
Bug fix (non-breaking change which fixes an issue)
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
No additional dependencies are required for this change. The fix involves modifying the composeMsMessage function in the microsoft365_email_sender.go file to use attachment.GetRawContent() for setting attachment content bytes.
Description
This pull request addresses the issue where attachments in emails sent using the Microsoft 365 provider were improperly processed. The attachments were being encoded into Base64 strings and then converted into byte arrays, resulting in incorrect attachment data being sent. The fix ensures that attachments are sent using raw byte data, preserving their integrity.
Checklist
Please ensure the following guidelines are met:
type(scope): description
.Additional Information
No additional dependencies are required for this change. The fix involves modifying the
composeMsMessage
function in themicrosoft365_email_sender.go
file to useattachment.GetRawContent()
for setting attachment content bytes.