I am trying to send email using the mandrill mail service, but I am getting the following error:
[ { "email": " pranav_withyou@hotmail.com ", "status": "rejected", "_id": "daab0daa538a4fe9b161be709593be0b", "reject_reason": "unsigned" } ]
I am trying to send an email using ajax call in javascript, for example:
$.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 go to an ajax call, and the call is made on the server, obvious from the answer. What could be the problem?
source share