You are here

function MCAPI::generateText in Mailchimp 7

Same name and namespace in other branches
  1. 5.2 MCAPI.class.php \MCAPI::generateText()
  2. 5 MCAPI.class.php \MCAPI::generateText()
  3. 6.2 MCAPI.class.php \MCAPI::generateText()
  4. 6 MCAPI.class.php \MCAPI::generateText()

Have HTML content auto-converted to a text-only format. You can send: plain HTML, an array of Template content, an existing Campaign Id, or an existing Template Id. Note that this will <b>not</b> save anything to or update any of your lists, campaigns, or templates.

@section Helper @example xml-rpc_generateText.php

Parameters

string $type The type of content to parse. Must be one of: "html", "template", "url", "cid" (Campaign Id), or "tid" (Template Id):

mixed $content The content to use. For "html" expects a single string value, "template" expects an array like you send to campaignCreate, "url" expects a valid & public URL to pull from, "cid" expects a valid Campaign Id, and "tid" expects a valid Template Id on your account.:

Return value

string the content pass in converted to text.

File

./MCAPI.class.php, line 1447

Class

MCAPI

Code

function generateText($type, $content) {
  $params = array();
  $params["type"] = $type;
  $params["content"] = $content;
  return $this
    ->callServer("generateText", $params);
}