Getting an issue with email_content property. When creating object it is defined and when dumping the object I can see the property.
$campaign = new Campaign(); $campaign->name = 'A name'; $campaign->subject = 'a subject'; $campaign->from_name = 'a name mail'; $campaign->from_email = 'email@example.com'; $campaign->greeting_string = ''; $campaign->reply_to_email = 'firstname.lastname@example.org'; $campaign->text_content = '<html><body>' . $message . '</body></html>'; $campaign->email_content = '<html><body>' . $message . '</body></html>'; $campaign->email_content_format = 'HTML'; $campaign->addList($delivery_list); $campaign = $this->cc->emailMarketingService->addCampaign(ACCESS_TOKEN, $campaign);
After the addCampaign I get the error email_content: Property is required but not found.
Thank you for reaching out to Constant Contact API Support.
I think the issue may be due to the value of your email_content property. Please email email@example.com with a snippet showing the real information you are using and I'll be happy to troubleshoot further.
Tier II API Support Engineer