2017-09-30 30 views
0

我試圖通過使用Mailgun的http請求發送消息,系統給我回200 OK,但消息從不發送。通過http請求通過Malign發送消息

這裏我的代碼,(我運行我的代碼解析httpReuest函數)任何想法?

Parse.Cloud.httpRequest({ 
    url: 'https://api:[email protected]/v3/MYDOMAIN.net/message', 

    params: { 
     from: '[email protected]', 
     to: '[email protected]', 
     subject: 'Hello', 
     text: 'Testing some Mailgun awesomness!' 

    } 
    }).then(function(httpResponse) { 
    console.log('Request response ' + httpResponse.error); 
    }, function(httpResponse) { 
    console.error('Request failed with response code ' + httpResponse.status); 
    }); 
+0

什麼你Mailgun日誌說什麼?你怎麼知道是沒有得到發送的消息? 我相信Mailgun要求您驗證您的帳戶,因此您也需要確保所有內容均已正確配置。 –

回答

0

我找到了答案...我在api調用中發現錯誤,正確的調用是。

url: 'https://api:[email protected]/v3/MYDOMAIN.net/messages', 

與消息沒有消息

忘記和s,浪費了整整一天:-(