Skip to content
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

Request failed with status code 405 #423

Open
7up-charsi opened this issue Sep 19, 2024 · 1 comment
Open

Request failed with status code 405 #423

7up-charsi opened this issue Sep 19, 2024 · 1 comment

Comments

@7up-charsi
Copy link

7up-charsi commented Sep 19, 2024

 const mailgun = new Mailgun(FormData);

const mg = mailgun.client({
  username: 'api',
  key: process.env.MAILGUN_API_KEY!,
  public_key: 'pubkey-5560f742f529383b5b8b83e60d0e85fa',
});

const result = await mg.messages.create(process.env.MAILGUN_DOMAIN!, {
  from: `Excited User <${process.env.MAILGUN_DOMAIN}>`,
  to: [process.env.HIRE_REQUEST_NOTIFICATION_EMAIL!],
  subject: `Hire Request: ${args.projectStatus}`,
  text: 'Testing some Mailgun awesomness!',
  html: '<h1>Testing some Mailgun awesomness!</h1>',
});

error:

[Error: Method Not Allowed] {
  status: 405,
  details: 'Request failed with status code 405',
  type: 'MailgunAPIError'
}
@slothtnsss
Copy link

not this api for send use api secret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants