-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HELP] How to make senderAddress Dynamic #803
Comments
Hi @sharukhkhanajm, thanks for opening this issue. This indeed is a flaw in the design of notify v1. This and other flaws are the reason I'm working on a v2 that gives you full control over everything at every stage of the service initialization and message sending processes. For now, probably the simplest fix would be to: // ... existing code
// Make the sender address configurable for your CustomNotifier, then create different
// instances of it depending on your needs.
func NewCustomNotifier(senderAddress string) (*CustomNotifier, error) {
// ... unchanged
}
// rest of your existing code ... I know this isn't a great solution, like I said, there's reasons I'm working on a new design for Notify's API. Hope this helps nonetheless. Let me know if I can help you otherwise. |
Code Implement
How can I make the final parameter,
senderAddress
, dynamic in this code?My use case is i may use
noreply@"+os.Getenv("DOMAIN_NAME")
orsupport@"+os.Getenv("DOMAIN_NAME")
The text was updated successfully, but these errors were encountered: