CSMail
in package
Tags
Table of Contents
- createMail() : object
- returns the content for the specified story id
- fetchMails() : void
- getContent() : string
- returns the content for the specified story id
- getHtmlContent() : string
- returns the html content for the specified story id
- getMail() : CSMailStub
- getTextContent() : mixed
- send() : CSMailStub
- Sends a mail please see RFC2822 (Internet Message Format) and RFC2076 (Common Internet Message Headers) The method is expected a set of mail-parameters.
- sendCalendar() : CSMailStub
- Sends a mail containing a calendar event please see RFC2822 (Internet Message Format) and RFC2076 (Common Internet Message Headers) The method is expected a set of mail-parameters.
- sendTemplate() : CSMailStub
Methods
createMail()
returns the content for the specified story id
public
static createMail() : object
Tags
Return values
object —a new HtmlMail
fetchMails()
public
static fetchMails([int $MailboxID = null ]) : void
Parameters
- $MailboxID : int = null
-
is the mailbox-id
Tags
Return values
void —getContent()
returns the content for the specified story id
public
static getContent(int $storyID[, object $user = null ][, string $websiteLang = '' ][, string $subProject = '' ][, string $subTemplate = 'newsletter' ][, string $format = 'html' ][, string $appendix = '' ]) : string
Parameters
- $storyID : int
-
the story id with the html content
- $user : object = null
-
the user context for the content generation
- $websiteLang : string = ''
-
the short language name for the content generation
- $subProject : string = ''
-
the sub project for the content generation
- $subTemplate : string = 'newsletter'
-
the sub template that should be used for the content generation
- $format : string = 'html'
-
the output format
- $appendix : string = ''
-
the appendix
Tags
Return values
string —the generated content
getHtmlContent()
returns the html content for the specified story id
public
static getHtmlContent(int $storyID[, object $user = null ][, string $websiteLang = '' ][, string $subProject = '' ][, string $appendix = '' ]) : string
Parameters
- $storyID : int
-
the story id with the html content
- $user : object = null
-
the user context for the content generation
- $websiteLang : string = ''
-
the short language name for the content generation
- $subProject : string = ''
-
the sub project for the content generation
- $appendix : string = ''
-
the appendix
Tags
Return values
string —the generated html content
getMail()
public
static getMail(int $CSMailRecordID) : CSMailStub
Parameters
- $CSMailRecordID : int
-
ID
Tags
Return values
CSMailStub —instance of class CSMailStub
getTextContent()
public
static getTextContent(mixed $storyID[, mixed $user = null ][, mixed $websiteLang = '' ][, mixed $subProject = '' ][, mixed $appendix = '' ]) : mixed
Parameters
- $storyID : mixed
- $user : mixed = null
- $websiteLang : mixed = ''
- $subProject : mixed = ''
- $appendix : mixed = ''
Tags
Return values
mixed —send()
Sends a mail please see RFC2822 (Internet Message Format) and RFC2076 (Common Internet Message Headers) The method is expected a set of mail-parameters.
public
static send(string $ac, string $subject, string $message[, string $cc = null ][, string $bcc = null ][, string $from = null ][, string $replyTo = null ][, int $priority = null ][, string $attachments = null ][, mixed $additionalHeaders = null ]) : CSMailStub
Parameters
- $ac : string
-
is the 'to-mail'-parameter
- $subject : string
-
is the 'subject-mail'-parameter
- $message : string
-
is the 'content of the mail'-parameter
- $cc : string = null
-
is the 'carbon-copy'-mail-parameter
- $bcc : string = null
-
is the 'blind-carbon-copy'-mail-parameter
- $from : string = null
-
is the 'from-mail'-parameter
- $replyTo : string = null
-
is the reference to message which this message is a reply to
- $priority : int = null
-
can be 1 = high to 5 = low and can influence transmission speed and delivery,
- $attachments : string = null
-
is array attachments from this mail array($filename=>$content1, $filename2=>$content2,.......)
- $additionalHeaders : mixed = null
Tags
Return values
CSMailStub —sendCalendar()
Sends a mail containing a calendar event please see RFC2822 (Internet Message Format) and RFC2076 (Common Internet Message Headers) The method is expected a set of mail-parameters.
public
sendCalendar(string $ac, string $subject, string $message, string $startDate, string $endDate, string $location[, string $organizer = '' ][, string $cc = null ][, string $bcc = null ][, string $from = null ][, string $replyTo = null ][, string $priority = null ][, mixed $additionalHeaders = null ]) : CSMailStub
Parameters
- $ac : string
-
is the 'to-mail'-parameter
- $subject : string
-
is the 'subject-mail'-parameter
- $message : string
-
is the 'content of the mail'-parameter
- $startDate : string
-
the date the calendar entry should start
- $endDate : string
-
the date the calendar entry should end
- $location : string
-
the location the calendar entry should be located on
- $organizer : string = ''
-
the organizer of the calendar entry
- $cc : string = null
-
is the 'carbon-copy'-mail-parameter
- $bcc : string = null
-
is the 'blind-carbon-copy'-mail-parameter
- $from : string = null
-
is the 'from-mail'-parameter
- $replyTo : string = null
-
is the reference to message which this message is a reply to
- $priority : string = null
-
can be "normal", "urgent" or "non-urgent" and can influence transmission speed and delivery,
- $additionalHeaders : mixed = null
Tags
Return values
CSMailStub —sendTemplate()
public
static sendTemplate(string $template, array<string|int, mixed> $params[, array<string|int, mixed> $attachments = array() ]) : CSMailStub
Parameters
- $template : string
-
the path to the template, relative to the admin directory
- $params : array<string|int, mixed>
-
associative array of key => value params that should be replaced in the template file
- $attachments : array<string|int, mixed> = array()
-
links to files which should be attached
