Closed sudhirkenguva closed 4 years ago
Hi @Sudhir-Kumar-K you can try something along the lines:
notifmeSdk.send({
email: {
to: 'john@example.com',
subject: 'Hi John',
html: '<b>Hello John! How are you?</b>',
customize: async (providerId, request) => ({
...request,
from: providerId === 'email-sendgrid-provider' ? 'fromsendgrid@example.com' : 'fromsmtp@example.com'
})
}
})
Thanks @BDav24!!! Its working. But I think these details are missing in documenation.
You're welcome. Yes, the documentation is lacking on this point.
Hi, I'm trying to have multiple providers, and trying to give different
from
emails for each of them.here is what i'm trying:
can i pass
from
field in each provider here in above segment? right now i'm passing it insidebut in this way, i'm only able to send email with single provider, as for me every email provider is having different
from
emails.