addMailingBindings gives error "No plain-text version avail"

Use this forum for all questions related to the source code of OpenEMM

Moderator: moderator

abinpaulr
Posts: 16
Joined: Fri May 29, 2015 6:49 am

addMailingBindings gives error "No plain-text version avail"

Post by abinpaulr »

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