I'm trying to send emails using mandrill email service but I get the following error:
[
{
"email": "pranav_withyou@hotmail.com",
"status": "rejected",
"_id": "daab0daa538a4fe9b161be709593be0b",
"reject_reason": "unsigned"
}
]
I am trying to send email using ajax call in javascript like :
$.ajax({
type: "POST",
url: "https://mandrillapp.com/api/1.0/messages/send.json",
data: {
"key": "RemovedforSecurityitscorrect",
"message": {
"html": "<p>Example HTML content</p>",
"text": $('#emailText').val(),
"subject": $('#emailSubject').val(),
"from_email": $('#fromEmail').val(),
"from_name": $('#fromName').val(),
"to": [{
"email": $('#toEmail').val(),
"name": $('#recipientName').val(),
"type": "to"
}],
"headers": {
"Reply-To": $('#fromName').val()
}
},
success: function (data) {
console.log("Email Sent");
},
error: function (xhr, status, error) {
console.log("Error while sending mail");
}
}
});
all values are coming to ajax call & call is made to server evident from response. What can be issue?