I recently started to use Mandrill for client e-mail sending. The client's website doesn't use any server side program, so every logic must be on client side.
What I have now is working in Chrome, FireFox, IE10, but not in LTE IE9 nor Android < 4.0 neither IOS :\
m = new mandrill.Mandrill("APIKEY", true)
m.call "messages/send", {
message:
html: createHtml()
subject: "subj"
from_email: "sender@example.dk",
from_name: "From",
to: [
email: "user@example.com"
name: "User"
]
}, (()->
console.log "success"
@
), ()->
console.log "error"
@
In this code, I'm using the JS Mandrill API wrapper, but I tried it with jQuery ajax POST-ing and I've got the same result.
jQuery version:
$.ajax
type: "POST"
url: "https://mandrillapp.com/api/1.0/messages/send.json"
data:
key: "APIKEY"
message:
html: createHtml()
subject: "subject"
from_email: "sender@example.dk",
from_name: "From",
to: [
email: "user@example.com"
name: "User"
]
Can anyone help me out, how to fix cross-domain API calling to Mandrill?