MailChimp API v3.0 Campaign Schedule Error
Asked Answered
L

2

6

I'm using the MailChimp API v3.0 and trying a schedule a campaign but every time I schedule and then check from my account it is not getting scheduled properly.

Here's the code I have,

        if($camp_content){

            $camp_schedule = $MailChimp->post('campaigns/'. $camp["id"] .'/actions/schedule',array(
                "schedule_time" => "2016-03-31 10:00:00",
                "timewarp" => false

            ));
        }

When I check the output after schedule I get this,

Array ( [title] => MC_API30_ Exception [status] => 406 [detail] => This campaign cannot be scheduled: . [instance] => )

Lacielacing answered 17/3, 2016 at 6:40 Comment(4)
What does "not getting scheduled properly" mean? Are they being scheduled at all? If so, what request are you sending vs. what time are they being scheduled for? Have you reached out to MailChimp's support team to see if it's a known issue?Buttonwood
Sorry for the confusion, but the mail simply not getting delivered. I create a new campaign with subscribers with no errors which i can see from the mailchimp account and according to the above code i pass schedule time as 2pm on 17th March 2016, and I send campaign if $camp_schedule is true.Lacielacing
I made some edits in the question.Lacielacing
It looks like your campaign is not sendable. Probably you're missing a subject, from name, from email, content or something else.Buttonwood
D
1

Your request for campaign schedule is 100% correct but the problem is with campaign.

After having 4 hours of debugging, I finally reached to the point. This error comes when your campaign is not ready 100%. For campaign debugging, use checklist url like this :

https://usX.api.mailchimp.com/3.0/campaigns/{campaing_id}/send-checklist?apikey=xxxxxxxxx

It will give you response like this:

http://prntscr.com/odyhaj

My error was the from_email.

Once you get true in this response, you will be able to schedule the cron. Make sure datetime should be multiple of 15 like: 00,15,30,45

Doolie answered 12/7, 2019 at 6:58 Comment(0)
C
0

I had the same issue and changed the sending email to be one with the same domain as my site. This worked for me so I assume it has something to do with the email address you are SENDING with.

Cliff answered 26/9, 2016 at 0:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.