I'm using a Response.Write in ASP to send an e-mail via Javascript using the Mandrill API, I've already checked this code for at least 5 times and the syntax looks right to me, I don't know why this error is being reported.
if err.number = 0 then
Response.Write("<script language=""javascript"" type=""text/javascript"">
$.ajax({
type: “POST”,
url: “https://mandrillapp.com/api/1.0/messages/send.json”,
data: {
‘key’: ‘MYAPIKEY’,
‘message’: {
‘from_email’: ‘MAIL’,
‘to’: [
{
‘email’: ‘MAIL’,
‘name’: ‘ABC’,
‘type’: ‘to’
},
],
‘autotext’: ‘true’,
‘subject’: ‘TEST’,
‘html’: ‘TEST’
}
}
}).done(function(response) {
console.log(response);
});
</script>")
end if
I'd appreciate some help since I'm a beginner.
“and‘with either'or an escaped"(escaped to not interfere with yourResponse.Writecall in ASP). On a slightly different note, I assume though the double"in your script tag are for escaping yeah?