Skip to content

allow to send html emails on mailgun - #1019

Open
firefart wants to merge 3 commits into
nikoksr:mainfrom
firefart:html
Open

allow to send html emails on mailgun#1019
firefart wants to merge 3 commits into
nikoksr:mainfrom
firefart:html

Conversation

@firefart

Copy link
Copy Markdown
Contributor

Description

This changes allows to send HTML emails with the mailgun provider. Currently all emails are hardcoded to plain text emails.

Motivation and Context

I want to send HTML emails using the mailgun provider

How Has This Been Tested?

locally

Screenshots / Output (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copilot AI review requested due to automatic review settings April 13, 2026 20:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for sending HTML email bodies when using the Mailgun notification provider, instead of always sending plain text.

Changes:

  • Introduce an internal Mailgun “mode” (text vs HTML) with a default of plain text.
  • Add a WithHTML() option to configure the Mailgun service to send HTML bodies.
  • Update Send() to build either a plain-text message or an HTML message based on the configured mode.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
service/mailgun/options.go Adds WithHTML() option to configure HTML mode for outgoing messages.
service/mailgun/mailgun.go Adds mode state and updates Send() to construct a text or HTML Mailgun message accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread service/mailgun/mailgun.go Outdated
Comment thread service/mailgun/options.go
Comment thread service/mailgun/mailgun.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants