StackOverflow'ta ilk sorumu sorduğum için çok heyecanlıyım. Yıllar boyunca kendime çok şey öğretmek için ona güveniyorum!Mandrill ValidationError
Sorum şu ki. Ben Mandrill en API üzerinden bir posta göndermeye çalışırken aşağıdaki hatayı alıyorum:
{"status":"error","code":-1,"name":"ValidationError","message":"You must specify a key value"}
aşağıdaki kod ben posta göndermek için denemek için kullanıyorum budur: Ne neden olabilecek
<?php
$to = '[email protected]';
$content = '<p>this is the emails html <a href="www.google.co.uk">content</a></p>';
$subject = 'this is the subject';
$from = '[email protected]';
$uri = 'https://mandrillapp.com/api/1.0/messages/send.json';
$content_text = strip_tags($content);
$postString = '{
"key": "RR_3yTMxxxxxxxx_Pa7gQ",
"message": {
"html": "' . $content . '",
"text": "' . $content_text . '",
"subject": "' . $subject . '",
"from_email": "' . $from . '",
"from_name": "' . $from . '",
"to": [
{
"email": "' . $to . '",
"name": "' . $to . '"
}
],
"track_opens": true,
"track_clicks": true,
"auto_text": true,
"url_strip_qs": true,
"preserve_recipients": true
},
"async": false
}';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);
$result = curl_exec($ch);
echo $result;
?>
iletideki doğrulama hatası. API anahtarımı sağlıyorum VE geçerli!
Birisi size yardım edebilecek ve umarım burada olduğunuzu umarız!
Teşekkürler!
Teşekkür Bu soruyu sorduğunuz için! Bütün gecemi cevap aramak için harcadım. – Ankit