Functions

Send out the newsletter.

actual_send_newsletter(\LONG_TEXT $message, \SHORT_TEXT $subject, \LANGUAGE_NAME $lang, array $send_details, \BINARY $html_only, string $from_email, string $from_name, integer $priority, string $csv_data, \ID_TEXT $mail_template) 

range 1 5

Parameters

$message

\LONG_TEXT

The newsletter message

$subject

\SHORT_TEXT

The newsletter subject

$lang

\LANGUAGE_NAME

The language

$send_details

array

A map describing what newsletters and newsletter levels the newsletter is being sent to

$html_only

\BINARY

Whether to only send in HTML format

$from_email

string

Override the email address the mail is sent from (blank: staff address)

$from_name

string

Override the name the mail is sent from (blank: site name)

$priority

integer

The message priority (1=urgent, 3=normal, 5=low)

$csv_data

string

CSV data of extra subscribers (blank: none). This is in the same ocPortal newsletter CSV format that we export elsewhere.

$mail_template

\ID_TEXT

The template used to show the email

Make a newsletter.

add_newsletter(\SHORT_TEXT $title, \LONG_TEXT $description) : \AUTO_LINK

Parameters

$title

\SHORT_TEXT

The title

$description

\LONG_TEXT

The description

Returns

\AUTO_LINKThe ID

Add to the newsletter, in the simplest way.

basic_newsletter_join(\EMAIL $email, integer $interest_level, \?LANGUAGE_NAME $lang, boolean $get_confirm_mail, \?AUTO_LINK $newsletter_id, string $forename, string $surname) : string

range 1 4

Parameters

$email

\EMAIL

The email address of the subscriber

$interest_level

integer

The interest level

$lang

\?LANGUAGE_NAME

The language (NULL: users)

$get_confirm_mail

boolean

Whether to require a confirmation mail

$newsletter_id

\?AUTO_LINK

The newsletter to join (NULL: the first)

$forename

string

Subscribers forename

$surname

string

Subscribers surname

Returns

stringNewsletter password

Delete a newsletter.

delete_newsletter(\AUTO_LINK $id) 

Parameters

$id

\AUTO_LINK

The ID

Edit a newsletter.

edit_newsletter(\AUTO_LINK $id, \SHORT_TEXT $title, \LONG_TEXT $description) 

Parameters

$id

\AUTO_LINK

The ID

$title

\SHORT_TEXT

The title

$description

\LONG_TEXT

The description