Function __global->newsletter_preview

Definitions

sources/newsletter.php

  • Generate a newsletter preview in full HTML and full text.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$message_raw string No No required parameter N/A N/A The message
$subject string No No required parameter N/A N/A The subject
$lang LANGUAGE_NAME No No required parameter N/A N/A The language
$html_only boolean No No required parameter N/A N/A Send in HTML only
$forename ?string No No Null N/A N/A Forename (null: reasonable default)
$surname ?string No No Null N/A N/A Surname (null: reasonable default)
$name ?string No No Null N/A N/A Name (null: reasonable default)
$email_address ?string No No Null N/A N/A E-mail address (null: reasonable default)
$send_id ?string No No Null N/A N/A Send ID (null: reasonable default)
$hash ?string No No Null N/A N/A Password hash (null: reasonable default)
$template ID_TEXT No No MAIL N/A N/A The mail template to preview with

Returns

  • A triple: HTML version, Text version, Whether the e-mail has to be fully HTML
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate a newsletter preview in full HTML and full text.
 *
 * @param  string $message_raw The message
 * @param  string $subject The subject
 * @param  LANGUAGE_NAME $lang The language
 * @param  boolean $html_only Send in HTML only
 * @param  ?string $forename Forename (null: reasonable default)
 * @param  ?string $surname Surname (null: reasonable default)
 * @param  ?string $name Name (null: reasonable default)
 * @param  ?string $email_address E-mail address (null: reasonable default)
 * @param  ?string $send_id Send ID (null: reasonable default)
 * @param  ?string $hash Password hash (null: reasonable default)
 * @param  ID_TEXT $template The mail template to preview with
 * @return array A triple: HTML version, Text version, Whether the e-mail has to be fully HTML
 */

function newsletter_preview(string $message_raw, string $subject, string $lang, bool $html_only, ?string $forename = null, ?string $surname = null, ?string $name = null, ?string $email_address = null, ?string $send_id = null, ?string $hash = null, string $template = 'MAIL') : array