Function __global->add_periodic_newsletter

Definitions

sources/newsletter2.php

  • Make a periodic newsletter.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$subject LONG_TEXT No No required parameter N/A N/A Subject
$message LONG_TEXT No No required parameter N/A N/A Message
$lang LANGUAGE_NAME No No required parameter N/A N/A Language to send for
$send_details LONG_TEXT No No required parameter N/A N/A The data sent in each newsletter
$html_only BINARY No No required parameter N/A N/A Whether to send in HTML only
$from_email SHORT_TEXT No No required parameter N/A N/A From address
$from_name SHORT_TEXT No No required parameter N/A N/A From name
$priority SHORT_INTEGER No No required parameter N/A N/A Priority
$spreadsheet_data LONG_TEXT No No required parameter N/A N/A Spreadsheet data of who to send to (JSON)
$frequency SHORT_TEXT No No required parameter weekly biweekly monthly N/A Send frequency
$day SHORT_INTEGER No No required parameter N/A N/A Weekday to send on
$in_full BINARY No No 0 N/A N/A Embed full articles
$template ID_TEXT No No MAIL N/A N/A Mail template to use, e.g. MAIL
$last_sent ?TIME No No Null N/A N/A When was last sent (null: now)

Returns

  • The ID
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a periodic newsletter.
 *
 * @param  LONG_TEXT $subject Subject
 * @param  LONG_TEXT $message Message
 * @param  LANGUAGE_NAME $lang Language to send for
 * @param  LONG_TEXT $send_details The data sent in each newsletter
 * @param  BINARY $html_only Whether to send in HTML only
 * @param  SHORT_TEXT $from_email From address
 * @param  SHORT_TEXT $from_name From name
 * @param  SHORT_INTEGER $priority Priority
 * @param  LONG_TEXT $spreadsheet_data Spreadsheet data of who to send to (JSON)
 * @param  SHORT_TEXT $frequency Send frequency
 * @set weekly biweekly monthly
 * @param  SHORT_INTEGER $day Weekday to send on
 * @param  BINARY $in_full Embed full articles
 * @param  ID_TEXT $template Mail template to use, e.g. MAIL
 * @param  ?TIME $last_sent When was last sent (null: now)
 * @return AUTO_LINK The ID
 */

function add_periodic_newsletter(string $subject, string $message, string $lang, string $send_details, int $html_only, string $from_email, string $from_name, int $priority, string $spreadsheet_data, string $frequency, int $day, int $in_full = 0, string $template = 'MAIL', ?int $last_sent = null) : int