feat: configure Mailgun EU API endpoint
Add explicit EU API endpoint configuration for Mailgun client to ensure emails are sent through the correct regional API server. This is required for accounts created in the EU region. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,14 +21,17 @@ function getMailgunClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const apiKey = process.env.MAILGUN_API_KEY;
|
const apiKey = process.env.MAILGUN_API_KEY;
|
||||||
const domain = process.env.MAILGUN_DOMAIN || 'rezije.app';
|
|
||||||
|
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
throw new Error('MAILGUN_API_KEY environment variable is not set');
|
throw new Error('MAILGUN_API_KEY environment variable is not set');
|
||||||
}
|
}
|
||||||
|
|
||||||
const mailgun = new Mailgun(formData);
|
const mailgun = new Mailgun(formData);
|
||||||
mailgunClient = mailgun.client({ username: 'api', key: apiKey });
|
mailgunClient = mailgun.client({
|
||||||
|
username: 'api',
|
||||||
|
key: apiKey,
|
||||||
|
url: "https://api.eu.mailgun.net"
|
||||||
|
});
|
||||||
|
|
||||||
return mailgunClient;
|
return mailgunClient;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user