This document provides code to programmatically create an email campaign using the Sendinblue API. It imports the Sendinblue library, initializes a client, defines the campaign settings like name, subject, sender, content, recipients, and scheduled time, and makes a call to the API to create the campaign.
This document provides code to programmatically create an email campaign using the Sendinblue API. It imports the Sendinblue library, initializes a client, defines the campaign settings like name, subject, sender, content, recipients, and scheduled time, and makes a call to the API to create the campaign.
This document provides code to programmatically create an email campaign using the Sendinblue API. It imports the Sendinblue library, initializes a client, defines the campaign settings like name, subject, sender, content, recipients, and scheduled time, and makes a call to the API to create the campaign.
SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey("api-key", "YOUR_API_V3_KEY"); $api_instance = new SendinBlue\Client\Api\EmailCampaignsApi(); $emailCampaigns = new \SendinBlue\Client\Model\CreateEmailCampaign();
# Define the campaign settings\
$email_campaigns['name'] = "Campaign sent via the API"; $email_campaigns['subject'] = "My subject"; $email_campaigns['sender'] = array("name": "From name", "email":"dolefil.vps@gmail.com"); $email_campaigns['type'] = "classic";
# Content that will be sent\
"htmlContent"=> "Congratulations! You successfully sent this example campaign via the Sendinblue API.",