Sendgrid plugin: Set different from-addresses when using localization options #5585
GitQuist
started this conversation in
Feature Requests
Replies: 1 comment
-
@GitQuist did you find a solution for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
It would be valuable to be able to set a different from sender email address when using the medusa-plugin-sendgrid.
Since we can use one backend to serve several storefronts that can be hosted on separate domains, it makes sense to be able to use different senders based on localisation.
So to be clear we have:
Backend hosted at: api.example.com
Storefront 1 hosted at: example.com
Storefront 2 hosted at example.org
Then the emails sent in storefront 2 should have the sender [email protected] and not @example.com.
I've looked at the plugin code and I think this would makes sense to add (inspired by the templateId function)
In
/medusa-plugin-sendgrid/services/sendgrid.js
we can add the followingAnd use that in the
sendNotification
function like so:What do you think? Is there any other way to solve this or would this make a good addition?
Beta Was this translation helpful? Give feedback.
All reactions