bmsanoussy
bmsanoussy
WWasp-lang
Created by bmsanoussy on 8/17/2024 in #đŸ™‹questions
Integration Issue with Mailgun in Wasp: 'Forbidden' Error Related to EU Domain
Thanks @martinsos you and all the team are doing a good job
15 replies
WWasp-lang
Created by bmsanoussy on 8/17/2024 in #đŸ™‹questions
Integration Issue with Mailgun in Wasp: 'Forbidden' Error Related to EU Domain
It's possible to specify the host in the ts-mailgun instance. We could add a new property MAILGUN_ZONE, with a default value of US. If this property is set to EU, the host would be added to the instance options. Something like this.
export function initMailgunEmailSender(
config: MailgunEmailProvider
): EmailSender {
const mailer = new NodeMailgun(config.apiKey, config.domain);

// Setting Mailgun options
if(config.zone === 'EU') {
mailer.options = {
host: 'api.eu.mailgun.net'
};
}
...
}
export function initMailgunEmailSender(
config: MailgunEmailProvider
): EmailSender {
const mailer = new NodeMailgun(config.apiKey, config.domain);

// Setting Mailgun options
if(config.zone === 'EU') {
mailer.options = {
host: 'api.eu.mailgun.net'
};
}
...
}
15 replies