addMailingBindings gives error "No plain-text version avail"
Posted: Tue Sep 15, 2015 6:45 am
Hi
I am trying to add template to mailing.
What I am doing is like.
$htmlBlockName = "emailHtml";
$data = array(
"mailingID" => $mailingid,
"blockName" => $htmlBlockName,
"targetID" => 0,
"content" => "This is html text content.",
"order" => 1
);
$client->client->AddContentBlock($data);
$textBlockName = "emailText";
$data['blockName'] = $textBlockName;
$data['content'] = 'This is text version of email';
$result = $client->client->AddContentBlock($data);
Then I do addMailingBindings to this mailing.
its okay till this stage. But when I try sendMailing I get error "No plain-text version available".
I tried
$htmlBlockName = "emailHtml";
$data = array(
"mailingID" => $mailingid,
"blockName" => $htmlBlockName,
"targetID" => 0,
"content" => "This is html text content.",
"order" => 1
);
$client->client->AddContentBlock($data);
after addMailingBindings but then I get error "no html version available".
Can any one help me, Please ask if you need some other detail. Really stuck at this point.
Thank You
I am trying to add template to mailing.
What I am doing is like.
$htmlBlockName = "emailHtml";
$data = array(
"mailingID" => $mailingid,
"blockName" => $htmlBlockName,
"targetID" => 0,
"content" => "This is html text content.",
"order" => 1
);
$client->client->AddContentBlock($data);
$textBlockName = "emailText";
$data['blockName'] = $textBlockName;
$data['content'] = 'This is text version of email';
$result = $client->client->AddContentBlock($data);
Then I do addMailingBindings to this mailing.
its okay till this stage. But when I try sendMailing I get error "No plain-text version available".
I tried
$htmlBlockName = "emailHtml";
$data = array(
"mailingID" => $mailingid,
"blockName" => $htmlBlockName,
"targetID" => 0,
"content" => "This is html text content.",
"order" => 1
);
$client->client->AddContentBlock($data);
after addMailingBindings but then I get error "no html version available".
Can any one help me, Please ask if you need some other detail. Really stuck at this point.
Thank You