1

Wordpress アプリからキャンペーン モニターでスマート トランザクション メールの送信をトリガーしようとしています。

require_once( get_stylesheet_directory() . '/createsend-php-master/csrest_transactional_smartemail.php' );

# Authenticate with your API key
$auth = array('api_key' => 'apikey');

# The unique identifier for this smart email
$smart_email_id = 'emailid';

# Create a new mailer and define your message
$wrap = new CS_REST_Transactional_SmartEmail($smart_email_id, $auth);
$message = array(
    "To" => 'email@email.com',
    "Data" => array(
        'x-apple-data-detectors' => 'x-apple-data-detectorsTestValue',
        'href^="tel"' => 'href^="tel"TestValue',
        'href^="sms"' => 'href^="sms"TestValue',
        'owa' => 'owaTestValue',
    ),
);

# Send the message and save the response
$result = $wrap->send($message);

正しい API と電子メール ID を取得しました。Gmail アカウントを使用してテストしていますが、電子メールがトリガーされません。私は初心者のコーダーであり、完全に明らかな何かを見逃していると思います!

キャンペーン モニターの php ファイルへのパスも正しいです。

API ドキュメントはこちら https://www.campaignmonitor.com/api/transactional/?_ga=1.180877863.1694927084.1483423346 - 見逃したものはありますか。助けていただければ幸いです。

4

0 に答える 0