email_content: Property is required but not found. SDK

Highlighted
Occasional Contributor

email_content: Property is required but not found. SDK

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 = 'delivery@mail.com';
            $campaign->greeting_string = '';
            $campaign->reply_to_email = 'to@mail.com';
            $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. 

 

1 REPLY 1
Highlighted
Moderator

Re: email_content: Property is required but not found. SDK

Hello,

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 webservices@constantcontact.com with a snippet showing the real information you are using and I'll be happy to troubleshoot further.

 

Sincerely,
David B.
Tier II API Support Engineer

Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured