Skip to content

Remove billing email types and SendGrid integration #35

Description

@BrewingCoder

Parent: #25 — Remove all SaaS billing code

Depends on: #26 (SendBillingNotifications removal)

What to Remove

email/email.go

  • 18 billing email type constants (lines 36-53): BillingHighlightTrial7Days through BillingInvalidPayment
  • OneTimeBillingNotifications array (lines 56-62)
  • getBillingNotificationSubject() function (lines 151-192)
  • getBillingNotificationMessage() function (lines 194-257)
  • SendBillingNotificationEmail() function (lines 259-294)
  • BillingNotificationTemplateID constant (line 25)
  • SendGridOutboundEmail constant (line 27) — if only used by billing

main.go — SendGrid client initialization

Line Usage
59 Import: sendgrid
364 sendgrid.NewSendClient(env.Config.SendgridKey)
500, 585 Passed to worker/OTEL resolvers

Resolver MailClient fields

File Line Usage
public-graph/graph/resolver.go 87 MailClient *sendgrid.Client
private-graph/graph/resolver.go 134 MailClient *sendgrid.Client

env config

  • SendgridKey env var — may need to keep if SendGrid is used for non-billing emails

Strategy

Check if SendGrid/email is used for ANY non-billing purpose. If billing is the only email use case, the entire email package + SendGrid dependency can be removed.

Test Plan

  • Determine if non-billing emails exist
  • Remove billing email types and functions
  • Remove or simplify SendGrid initialization
  • Remove MailClient from resolvers if fully unused
  • Verify build + tests

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions