You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to debug an issue with the client, and I've got some code I'm using -- pulled straight from the github page, substituting in my api key and domain / email addresses. When I run it having it send the email using the regular mailgun client, it works fine. If I use the extra parameters, specifying bin.mailgun.net and the code -- it gives me the following error:
405 Method Not Allowed
any tips on how to make this work?
(I am of course substituing my actual api key and domain in the code -- I've tried both my live domain and sandbox, but they both give the 405)
$api_key = 'my-api-key'
$domain = 'my-domain'
def test_postbin(mg_client, subject)
mg_client ||= Mailgun::Client.new($api_key, "bin.mailgun.net", "7d9a62e", ssl = false)
message_params = { from: "me@#{$domain}",
to: '[email protected]',
subject: subject,
text: 'It is really easy to send a message -- hopefully this works!'
}
mg_client.send_message($domain, message_params)
end
mg_client = Mailgun::Client.new($api_key)
test_postbin(mg_client, "testing with mailgun")
test_postbin(nil, "testing with postbin")
The text was updated successfully, but these errors were encountered:
I'm trying to debug an issue with the client, and I've got some code I'm using -- pulled straight from the github page, substituting in my api key and domain / email addresses. When I run it having it send the email using the regular mailgun client, it works fine. If I use the extra parameters, specifying bin.mailgun.net and the code -- it gives me the following error:
405 Method Not Allowed
any tips on how to make this work?
(I am of course substituing my actual api key and domain in the code -- I've tried both my live domain and sandbox, but they both give the 405)
The text was updated successfully, but these errors were encountered: