Skip to content

Allow custom mail server URL in sendEmail function#2

Merged
jalexw merged 2 commits into
mainfrom
claude/fix-mailserver-url-handling-VC3t8
Apr 19, 2026
Merged

Allow custom mail server URL in sendEmail function#2
jalexw merged 2 commits into
mainfrom
claude/fix-mailserver-url-handling-VC3t8

Conversation

@jalexw

@jalexw jalexw commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Added support for overriding the mail server URL via an optional parameter in the sendEmail function, while maintaining backward compatibility with the existing hardcoded domain resolution.

Key Changes

  • Modified sendEmail function to accept an optional mailServerUrl parameter in the options object
  • Implemented conditional logic to use the provided mailServerUrl if supplied, otherwise fall back to the existing getHardcodedApiServerDomain() resolution
  • Updated package version from 0.0.17 to 0.0.18

Implementation Details

The change introduces a simple conditional check that prioritizes a custom mail server URL when provided via opts.mailServerUrl. If not provided (or not a string), the function defaults to the original behavior of resolving the domain through getHardcodedApiServerDomain(). This maintains full backward compatibility while enabling flexibility for custom deployments or testing scenarios.

https://claude.ai/code/session_01Hw6bDj3pwgRoUgj5dpLMo1

@jalexw jalexw merged commit 973844b into main Apr 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants