javascript - Trying to get Mandrill to send an email (codecademy exercise) -
i'm trying learn how use api's , stumbled upon codecademy's course , i'm doing mandrill api course
// create function log response mandrill api function log(obj) { $('#response').text(json.stringify(obj)); } // create new instance of mandrill class api key var m = new mandrill.mandrill('sdjw??-3fk4r1h8ah2vckw'); // create variable api call parameters var params = { "message": { "from_email":"jack??@yahoo.com", "to":[{"email":"jack??@yahoo.com"}], "subject": "sending text email mandrill api", "text": "i'm learning mandrill api @ codecademy." } }; function sendthemail() { // send email! m.messages.send(params, function(res) { log(res); }, function(err) { log(err); }); }
the api key should work. course allowed me test in previous exercise. heard mandrill had changes mentions
you must add spf , dkim records , verify ownership of sending domains before can send email through account.
i'm wondering if made mistake in exercise or if exercise dosen't work anymore because of recent changes. hope link showed wasn't blocked .
here error response:
[{"email":"jack??@yahoo.com","status":"rejected","_id":"?7ec118ce30044d493795081552c57d2","reject_reason":"unsigned"}]
there nothing wrong in code. test using account api key , works fine. on mandrill recent changes see here
Comments
Post a Comment