NewsletterManager
extends NewsletterLib
in package
Class newsletter
Newsletter module class
Tags
Table of Contents
Constants
- UNSUBSCRIBE_BEHAVIOR_AUTOMATIC = 'automatic'
- UNSUBSCRIBE_BEHAVIOR_MANUAL = 'manual'
- USER_TYPE_ACCESS = 'access'
- USER_TYPE_CORE = 'core'
- USER_TYPE_CRM = 'crm'
- USER_TYPE_NEWSLETTER = 'newsletter'
Properties
- $_arrMailPriority : mixed
- $_arrRecipientTitles : mixed
- $_attachmentPath : mixed
- $_objTpl : mixed
- $_pageTitle : mixed
- $_stdMailPriority : mixed
- $months : mixed
- $strErrMessage : mixed
- $strOkMessage : mixed
- $act : mixed
- $arrLists : array<string|int, mixed>
- List of present Lists
Methods
- __construct() : mixed
- PHP5 constructor
- _addList() : bool
- Add a list with the given name and status
- _addMail() : mixed
- _addMailAttachment() : mixed
- _addRecipient() : bool
- Add a recipient with the given parameter values and subscribe to the lists with their ID present in $arrLists
- _addRecipientTitle() : mixed
- _addTemplate() : mixed
- _changeListStatus() : mixed
- _checkUniqueListName() : mixed
- _copyMail() : mixed
- _createDatesDropdown() : mixed
- Create and select the date dropdowns for choosing the birthday
- _deleteInactiveRecipients() : void
- delete all inactice recipients
- _deleteList() : mixed
- _deleteMail() : mixed
- _deleteRecipient() : mixed
- _editList() : mixed
- _editMail() : null
- Add/Edit the mail template
- _editTemplate() : mixed
- _editUser() : mixed
- _emailCode() : mixed
- _flushList() : mixed
- _getAssociatedListSelection() : mixed
- _getAssociatedListsOfRecipient() : array<string|int, mixed>
- Returns an array of List IDs to which the recipient with the given ID is subscribed
- _getBodyContent() : mixed
- _getEmailsDropDown() : mixed
- _getHTML() : mixed
- _getList() : mixed
- _getListHTML() : mixed
- _getMailPriorityMenu() : mixed
- _getNewsPage() : null
- Parse the news section
- _getNewsPreviewPage() : null
- Display the preview of the news in email template
- _getRecipientTitleMenu() : mixed
- _getRecipientTitles() : mixed
- _getSettings() : mixed
- This is a workaround for PHP 7 compatability.
- _getTemplateMenu() : mixed
- _getTemplates() : mixed
- _initRecipientTitles() : mixed
- _isUniqueRecipientEmail() : mixed
- _lists() : mixed
- Display the list administration page
- _mails() : mixed
- _prepareNewsletterLinksForCopy() : mixed
- _prepareNewsletterLinksForStore() : mixed
- _prepareNewsPreview() : string
- Replace the placeholders formats
- _removeMailAttachment() : mixed
- _sendMail() : mixed
- Send the mails
- _sendMailPage() : mixed
- Show the mail send page
- _sendTestMail() : mixed
- _setMailLists() : mixed
- _setRecipientLists() : bool
- Add the recipient with the given ID to all the lists with their IDs present in the array
- _setTmpSending() : mixed
- Add the email address to the temp
- _showEmailFeedbackAnalysis() : mixed
- _showLinkFeedbackAnalysis() : mixed
- _showRecipientEmailFeedbackAnalysis() : mixed
- _showRecipientFeedbackAnalysis() : mixed
- _templates() : mixed
- _update() : mixed
- _updateList() : mixed
- _updateMail() : mixed
- _updateRecipient() : mixed
- _updateTemplate() : mixed
- _userList() : mixed
- _users() : mixed
- _validateRecipientAttributes() : mixed
- autoCleanRegisters() : mixed
- Auto clean a registers
- CategoryDropDown() : mixed
- ConfigDispatch() : mixed
- ConfigHTML() : mixed
- DateForDB() : mixed
- dateFromInput() : long
- Takes a date in the format dd.mm.yyyy hh:mm and returns it's representation as mktime()-timestamp.
- dbFromDate() : string
- Takes a mktime()-timestamp and formats it as yyyy-mm-dd hh:mm:00 for insertion in db.
- delTemplate() : mixed
- edituserSort() : mixed
- emailEditParseLists() : mixed
- Parse the lists to be selected as email recipients
- emailTemplates() : mixed
- Parse Settings E-mail templates section
- exportuser() : mixed
- feedback() : mixed
- getListIdByName() : int
- Returns the ID of the list specified by its name
- getListNameById() : mixed
- Get newsletter list name by given id
- getLists() : array<string|int, mixed>
- Returns an array of all Newsletter lists
- getNewsletterPlaceHoldersList() : string
- Get available placeholders in newsletter notification mails
- getNewsMailContent() : string
- Get News content to send email
- getPage() : mixed
- Set the backend page
- GetProfileURL() : mixed
- Return link to the profile of a user
- getRecipientLocaleIdByRecipientId() : int
- Returns the Language ID for a newsletter recipient
- getSettings() : mixed
- This is a workaround for PHP 7 compatability.
- GetTemplateSource() : mixed
- GetUnsubscribeURL() : mixed
- Get the URL to the page to unsubscribe
- getUsersPreferredLanguageId() : int
- Returns the Language ID for a newsletter user
- importuser() : mixed
- interfaceSettings() : mixed
- JSadduser() : mixed
- JSedituser() : mixed
- NewsletterNotSendCount() : mixed
- NewsletterSendCount() : mixed
- parseConsentView() : string
- Parses the consent icons
- parseNewsDetails() : null
- Parse the news details blocks
- ParseNewsletter() : mixed
- Parse the newsletter
- SelectListCategory() : mixed
- SelectListFields() : mixed
- SelectListStatus() : mixed
- sendConsentConfirmationMail() : bool
- Send a consent confirmation mail to users based on mailing list
- showSettings() : mixed
- Parse the newsletter settings section
- UserCount() : mixed
- valueFromDate() : string
- Takes a mktime()-timestamp and formats it as dd.mm.yyyy hh:mm
- _getGroups() : array<string|int, mixed>
- Return the access user groups
- emailEditGetCrmMembershipFilter() : array<string|int, mixed>
- Return the Crm membership filter of an email
- escapeCsvValue() : string
- Escape a value that it could be inserted into a csv file.
- getAttributeOfTag() : string
- Returns the value of an attribute of the specified HTML tag name
- getCountryMenu() : mixed
- getCrmMembershipConditions() : string
- Returns the where condition for the filtered crm newsletter recipients
- getCssAttributeOfTag() : string
- Returns the value of an attribute of the style attribute of an HTML tag
- getListRecipientCount() : int
- Return the count of recipients of a list
- getMailRecipientQuery() : string
- Return the recipient SQL query for a specific e-mail campaign
- getNewsletterData() : array<string|int, mixed>
- Return some newsletter data
- getRecipientListAssociation() : array<string|int, mixed>
- Get the list associations for all recipients.
- getSetting() : string
- Return a setting from the settings table
- getTmpSending() : DBIterator
- Get the emails from the tmp sending page
- getUserDateTime() : string
- Get a user dateTime in H:i:s d.m.Y format from db data
- getUserEditLink() : mixed
- Return the Edit link of the inform email
- informAdminAboutRejectedMail() : mixed
- Inform the admin about a reject
- prepareForRegExp() : mixed
- prepareNewsletterLinksForSend() : mixed
- SendEmail() : mixed
- Deliver an email campaign to a recipient
- setAttributeOfTag() : string
- Sets the HTML attribute of a tag to a specified value
- setCrmMembershipFilter() : bool
- Store the CRM membership filter
- _getMailRecipientCount() : mixed
- emailEditGetAssociatedGroups() : array<string|int, mixed>
- Return the associated access groups of an email
- emailEditParseGroups() : mixed
- Parse the groups into the mail edit page
- getAllRecipientEmails() : object
- Return all email recipients
- getCurrentMailRecipientCount() : int
- Return the recipient count of the emails
- getFinalMailRecipientCount() : mixed
- getLinkData() : mixed
- getNewsletterUserData() : adodb
- Return the user data
- getNewsletterValues() : array<string|int, mixed>
- Return the newsletter values
- getTmpRecipientCount() : int
- Return the recipient count of a newsletter in the temp table
- insertTmpEmail() : mixed
- Insert an email address into the email table
- returnNewsletterUser() : array<string|int, mixed>
- Return all newsletter users and those access users who are assigned to the list and their information
- setMailGroups() : mixed
- Associate the user groups with the mail
- updateNewsletterRecipientCount() : mixed
- Update the recipient count of a newsletter
Constants
UNSUBSCRIBE_BEHAVIOR_AUTOMATIC
public
mixed
UNSUBSCRIBE_BEHAVIOR_AUTOMATIC
= 'automatic'
UNSUBSCRIBE_BEHAVIOR_MANUAL
public
mixed
UNSUBSCRIBE_BEHAVIOR_MANUAL
= 'manual'
USER_TYPE_ACCESS
public
mixed
USER_TYPE_ACCESS
= 'access'
USER_TYPE_CORE
public
mixed
USER_TYPE_CORE
= 'core'
USER_TYPE_CRM
public
mixed
USER_TYPE_CRM
= 'crm'
USER_TYPE_NEWSLETTER
public
mixed
USER_TYPE_NEWSLETTER
= 'newsletter'
Properties
$_arrMailPriority
public
mixed
$_arrMailPriority
= array(1 => 'TXT_NEWSLETTER_VERY_HIGH', 2 => 'TXT_NEWSLETTER_HIGH', 3 => 'TXT_NEWSLETTER_MEDIUM', 4 => 'TXT_NEWSLETTER_LOW', 5 => 'TXT_NEWSLETTER_VERY_LOW')
$_arrRecipientTitles
public
mixed
$_arrRecipientTitles
= null
$_attachmentPath
public
mixed
$_attachmentPath
= '/images/attach/'
$_objTpl
public
mixed
$_objTpl
$_pageTitle
public
mixed
$_pageTitle
$_stdMailPriority
public
mixed
$_stdMailPriority
= 3
$months
public
mixed
$months
= array()
$strErrMessage
public
static mixed
$strErrMessage
= ''
$strOkMessage
public
static mixed
$strOkMessage
= ''
$act
private
mixed
$act
= ''
$arrLists
List of present Lists
private
static array<string|int, mixed>
$arrLists
= null
Tags
Methods
__construct()
PHP5 constructor
public
__construct() : mixed
Tags
_addList()
Add a list with the given name and status
public
static _addList(string $listName[, bool $listStatus = false ][, mixed $notificationMail = '' ]) : bool
Upon successfully adding a new list, resets the $arrLists class variable to null.
Parameters
- $listName : string
-
The new list name
- $listStatus : bool = false
-
The new list status, defaults to false for inactive
- $notificationMail : mixed = ''
Tags
Return values
bool —True on success, false otherwise
_addMail()
public
_addMail(mixed $subject, mixed $template, mixed $senderMail, mixed $senderName, mixed $replyMail, mixed $smtpServer, mixed $priority, mixed $arrAttachment, mixed $htmlContent) : mixed
Parameters
- $subject : mixed
- $template : mixed
- $senderMail : mixed
- $senderName : mixed
- $replyMail : mixed
- $smtpServer : mixed
- $priority : mixed
- $arrAttachment : mixed
- $htmlContent : mixed
_addMailAttachment()
public
_addMailAttachment(mixed $attachment[, mixed $mailId = 0 ]) : mixed
Parameters
- $attachment : mixed
- $mailId : mixed = 0
_addRecipient()
Add a recipient with the given parameter values and subscribe to the lists with their ID present in $arrLists
public
static _addRecipient(string $email, string $uri, string $sex, mixed $salutation, string $title, string $lastname, string $firstname, mixed $position, string $company, mixed $industry_sector, string $address, string $zip, string $city, string $country, mixed $phone_office, mixed $phone_private, mixed $phone_mobile, mixed $fax, mixed $notes, string $birthday, string $status, array<string|int, mixed> $arrLists, int $language, mixed $source) : bool
Parameters
- $email : string
-
The e-mail address
- $uri : string
-
The website URL
- $sex : string
-
The sex
- $salutation : mixed
- $title : string
-
The title
- $lastname : string
-
The last name
- $firstname : string
-
The first name
- $position : mixed
- $company : string
-
The company name
- $industry_sector : mixed
- $address : string
-
The address address
- $zip : string
-
The ZIP
- $city : string
-
The city
- $country : string
-
The country ID
- $phone_office : mixed
- $phone_private : mixed
- $phone_mobile : mixed
- $fax : mixed
- $notes : mixed
- $birthday : string
-
The birth date
- $status : string
-
The active status
- $arrLists : array<string|int, mixed>
-
The array of subscribed list IDs
- $language : int
-
The preferred language ID
- $source : mixed
Tags
Return values
bool —True on success, false otherwise
_addRecipientTitle()
public
_addRecipientTitle(mixed $title) : mixed
Parameters
- $title : mixed
_addTemplate()
public
_addTemplate(mixed $name, mixed $description, mixed $html, mixed $type) : mixed
Parameters
- $name : mixed
- $description : mixed
- $html : mixed
- $type : mixed
_changeListStatus()
public
_changeListStatus() : mixed
_checkUniqueListName()
public
static _checkUniqueListName(mixed $listId, mixed $listName) : mixed
Parameters
- $listId : mixed
- $listName : mixed
_copyMail()
public
_copyMail() : mixed
_createDatesDropdown()
Create and select the date dropdowns for choosing the birthday
public
_createDatesDropdown([array<string|int, mixed>|string $birthday = '' ]) : mixed
Parameters
- $birthday : array<string|int, mixed>|string = ''
_deleteInactiveRecipients()
delete all inactice recipients
public
_deleteInactiveRecipients() : void
_deleteList()
public
_deleteList() : mixed
_deleteMail()
public
_deleteMail() : mixed
_deleteRecipient()
public
_deleteRecipient(mixed $id) : mixed
Parameters
- $id : mixed
_editList()
public
_editList() : mixed
_editMail()
Add/Edit the mail template
public
_editMail([bool $copy = false ]) : null
Parameters
- $copy : bool = false
-
If true, copy the newsletter mail when mailid is not empty If false, Add/Edit the newsletter mail
Return values
null_editTemplate()
public
_editTemplate() : mixed
_editUser()
public
_editUser() : mixed
_emailCode()
public
static _emailCode() : mixed
_flushList()
public
_flushList() : mixed
_getAssociatedListSelection()
public
_getAssociatedListSelection() : mixed
_getAssociatedListsOfRecipient()
Returns an array of List IDs to which the recipient with the given ID is subscribed
public
static _getAssociatedListsOfRecipient(int $recipientId[, bool $onlyActiveLists = true ]) : array<string|int, mixed>
On failure, or if the ID is invalid or empty, the empty array is returned.
Parameters
- $recipientId : int
-
The recipient ID
- $onlyActiveLists : bool = true
-
Return all lists if false, all lists otherwise. Defaults to true
Tags
Return values
array<string|int, mixed> —The array of subscribed List IDs on success, the empty array otherwise
_getBodyContent()
public
_getBodyContent(mixed $fullContent) : mixed
Parameters
- $fullContent : mixed
_getEmailsDropDown()
public
_getEmailsDropDown([mixed $name = 'sendEmail' ][, mixed $selected = 0 ][, mixed $attrs = '' ]) : mixed
Parameters
- $name : mixed = 'sendEmail'
- $selected : mixed = 0
- $attrs : mixed = ''
_getHTML()
public
_getHTML([mixed $onlyId = false ]) : mixed
Parameters
- $onlyId : mixed = false
_getList()
public
_getList(mixed $listId) : mixed
Parameters
- $listId : mixed
_getListHTML()
public
_getListHTML() : mixed
_getMailPriorityMenu()
public
_getMailPriorityMenu([mixed $selectedPriority = 3 ][, mixed $attributes = '' ]) : mixed
Parameters
- $selectedPriority : mixed = 3
- $attributes : mixed = ''
_getNewsPage()
Parse the news section
public
_getNewsPage() : null
Return values
null_getNewsPreviewPage()
Display the preview of the news in email template
public
_getNewsPreviewPage() : null
Return values
null_getRecipientTitleMenu()
public
_getRecipientTitleMenu([mixed $selected = 0 ][, mixed $attrs = '' ]) : mixed
Parameters
- $selected : mixed = 0
- $attrs : mixed = ''
_getRecipientTitles()
public
_getRecipientTitles() : mixed
_getSettings()
This is a workaround for PHP 7 compatability.
public
_getSettings() : mixed
As the method _getSettings was used in mixed scope.
Tags
_getTemplateMenu()
public
_getTemplateMenu([mixed $selectedTemplate = '' ][, mixed $attributes = '' ][, mixed $type = 'e-mail' ]) : mixed
Parameters
- $selectedTemplate : mixed = ''
- $attributes : mixed = ''
- $type : mixed = 'e-mail'
_getTemplates()
public
_getTemplates([mixed $type = 'e-mail' ]) : mixed
Parameters
- $type : mixed = 'e-mail'
_initRecipientTitles()
public
_initRecipientTitles() : mixed
_isUniqueRecipientEmail()
public
_isUniqueRecipientEmail(mixed $email, mixed $recipientId[, mixed $copy = false ]) : mixed
Parameters
- $email : mixed
- $recipientId : mixed
- $copy : mixed = false
_lists()
Display the list administration page
public
_lists() : mixed
Tags
_mails()
public
_mails() : mixed
_prepareNewsletterLinksForCopy()
public
_prepareNewsletterLinksForCopy(mixed $MailHtmlContent) : mixed
Parameters
- $MailHtmlContent : mixed
_prepareNewsletterLinksForStore()
public
_prepareNewsletterLinksForStore(mixed $MailId) : mixed
Parameters
- $MailId : mixed
_prepareNewsPreview()
Replace the placeholders formats
public
_prepareNewsPreview(string $TemplateSource) : string
Parameters
- $TemplateSource : string
-
template content
Return values
string_removeMailAttachment()
public
_removeMailAttachment(mixed $attachment[, mixed $mailId = 0 ]) : mixed
Parameters
- $attachment : mixed
- $mailId : mixed = 0
_sendMail()
Send the mails
public
_sendMail() : mixed
_sendMailPage()
Show the mail send page
public
_sendMailPage() : mixed
_sendTestMail()
public
_sendTestMail(mixed $mailId) : mixed
Parameters
- $mailId : mixed
_setMailLists()
public
_setMailLists(mixed $mailId, mixed $arrLists, mixed $mailSentDate) : mixed
Parameters
- $mailId : mixed
- $arrLists : mixed
- $mailSentDate : mixed
_setRecipientLists()
Add the recipient with the given ID to all the lists with their IDs present in the array
public
static _setRecipientLists(int $recipientId, array<string|int, mixed> $arrLists, string $source[, bool $setTime = false ]) : bool
Parameters
- $recipientId : int
-
The recipient ID
- $arrLists : array<string|int, mixed>
-
The array of list IDs to subscribe
- $source : string
-
One of "opt-in", "backend", "api"
- $setTime : bool = false
-
(optional) if set to true, consent is stored as confirmed
Tags
Return values
bool —True on success, false otherwise
_setTmpSending()
Add the email address to the temp
public
_setTmpSending(int $mailId) : mixed
Parameters
- $mailId : int
Tags
_showEmailFeedbackAnalysis()
public
_showEmailFeedbackAnalysis() : mixed
_showLinkFeedbackAnalysis()
public
_showLinkFeedbackAnalysis() : mixed
_showRecipientEmailFeedbackAnalysis()
public
_showRecipientEmailFeedbackAnalysis() : mixed
_showRecipientFeedbackAnalysis()
public
_showRecipientFeedbackAnalysis() : mixed
_templates()
public
_templates() : mixed
_update()
public
_update() : mixed
_updateList()
public
_updateList(mixed $listId, mixed $listName, mixed $listStatus, mixed $notificationMail) : mixed
Parameters
- $listId : mixed
- $listName : mixed
- $listStatus : mixed
- $notificationMail : mixed
_updateMail()
public
_updateMail(mixed $mailId, mixed $subject, mixed $template, mixed $senderMail, mixed $senderName, mixed $replyMail, mixed $smtpServer, mixed $priority, mixed $arrAttachment, mixed $htmlContent) : mixed
Parameters
- $mailId : mixed
- $subject : mixed
- $template : mixed
- $senderMail : mixed
- $senderName : mixed
- $replyMail : mixed
- $smtpServer : mixed
- $priority : mixed
- $arrAttachment : mixed
- $htmlContent : mixed
_updateRecipient()
public
_updateRecipient(mixed $recipientAttributeStatus, mixed $id, mixed $email, mixed $uri, mixed $sex, mixed $salutation, mixed $title, mixed $lastname, mixed $firstname, mixed $position, mixed $company, mixed $industry_sector, mixed $address, mixed $zip, mixed $city, mixed $country, mixed $phone_office, mixed $phone_private, mixed $phone_mobile, mixed $fax, mixed $notes, mixed $birthday, mixed $status, mixed $arrLists, mixed $language, mixed $source[, mixed $setTime = false ]) : mixed
Parameters
- $recipientAttributeStatus : mixed
- $id : mixed
- $email : mixed
- $uri : mixed
- $sex : mixed
- $salutation : mixed
- $title : mixed
- $lastname : mixed
- $firstname : mixed
- $position : mixed
- $company : mixed
- $industry_sector : mixed
- $address : mixed
- $zip : mixed
- $city : mixed
- $country : mixed
- $phone_office : mixed
- $phone_private : mixed
- $phone_mobile : mixed
- $fax : mixed
- $notes : mixed
- $birthday : mixed
- $status : mixed
- $arrLists : mixed
- $language : mixed
- $source : mixed
- $setTime : mixed = false
_updateTemplate()
public
_updateTemplate(mixed $id, mixed $name, mixed $description, mixed $html, mixed $type) : mixed
Parameters
- $id : mixed
- $name : mixed
- $description : mixed
- $html : mixed
- $type : mixed
_userList()
public
_userList() : mixed
Tags
_users()
public
_users() : mixed
_validateRecipientAttributes()
public
_validateRecipientAttributes(mixed $recipientAttributeStatus, mixed $recipient_website, mixed $recipient_sex, mixed $recipient_salutation, mixed $recipient_title, mixed $recipient_lastname, mixed $recipient_firstname, mixed $recipient_position, mixed $recipient_company, mixed $recipient_industry, mixed $recipient_address, mixed $recipient_zip, mixed $recipient_city, mixed $recipient_country, mixed $recipient_phone, mixed $recipient_private, mixed $recipient_mobile, mixed $recipient_fax, mixed $recipient_birthday) : mixed
Parameters
- $recipientAttributeStatus : mixed
- $recipient_website : mixed
- $recipient_sex : mixed
- $recipient_salutation : mixed
- $recipient_title : mixed
- $recipient_lastname : mixed
- $recipient_firstname : mixed
- $recipient_position : mixed
- $recipient_company : mixed
- $recipient_industry : mixed
- $recipient_address : mixed
- $recipient_zip : mixed
- $recipient_city : mixed
- $recipient_country : mixed
- $recipient_phone : mixed
- $recipient_private : mixed
- $recipient_mobile : mixed
- $recipient_fax : mixed
- $recipient_birthday : mixed
autoCleanRegisters()
Auto clean a registers
public
autoCleanRegisters() : mixed
CategoryDropDown()
public
CategoryDropDown([mixed $name = 'category' ][, mixed $selected = 0 ][, mixed $attrs = '' ]) : mixed
Parameters
- $name : mixed = 'category'
- $selected : mixed = 0
- $attrs : mixed = ''
ConfigDispatch()
public
ConfigDispatch() : mixed
ConfigHTML()
public
ConfigHTML() : mixed
DateForDB()
public
DateForDB() : mixed
dateFromInput()
Takes a date in the format dd.mm.yyyy hh:mm and returns it's representation as mktime()-timestamp.
public
dateFromInput( $value) : long
Parameters
Return values
long —timestamp
dbFromDate()
Takes a mktime()-timestamp and formats it as yyyy-mm-dd hh:mm:00 for insertion in db.
public
dbFromDate( $value) : string
Parameters
Return values
stringdelTemplate()
public
delTemplate() : mixed
edituserSort()
public
edituserSort() : mixed
emailEditParseLists()
Parse the lists to be selected as email recipients
public
emailEditParseLists(array<string|int, mixed> $associatedLists) : mixed
Parameters
- $associatedLists : array<string|int, mixed>
Tags
emailTemplates()
Parse Settings E-mail templates section
public
emailTemplates() : mixed
exportuser()
public
exportuser() : mixed
feedback()
public
feedback(mixed &$users, mixed &$linkCount, mixed &$feedbackCount, mixed &$emailCount) : mixed
Parameters
- $users : mixed
- $linkCount : mixed
- $feedbackCount : mixed
- $emailCount : mixed
getListIdByName()
Returns the ID of the list specified by its name
public
static getListIdByName(string $list_name) : int
Used for importing/setting up User-List relations
Parameters
- $list_name : string
-
The List name
Return values
int —The matching list ID if found, null otherwise
getListNameById()
Get newsletter list name by given id
public
getListNameById(int $listId) : mixed
Parameters
- $listId : int
-
List id
Return values
mixed —string or null
getLists()
Returns an array of all Newsletter lists
public
static getLists([mixed $excludeHiddenLists = false ][, mixed $extendedInfo = false ]) : array<string|int, mixed>
Parameters
- $excludeHiddenLists : mixed = false
- $extendedInfo : mixed = false
Tags
Return values
array<string|int, mixed> —The array of Newsletter lists
getNewsletterPlaceHoldersList()
Get available placeholders in newsletter notification mails
public
getNewsletterPlaceHoldersList() : string
Return values
string —Newsletter placehodlers list
getNewsMailContent()
Get News content to send email
public
getNewsMailContent(string $importTemplate, NewsLibrary $objNewsLib, object $objNews[, bool $stripTeaser = false ]) : string
Parameters
- $importTemplate : string
-
News Template content
- $objNewsLib : NewsLibrary
-
News library object
- $objNews : object
-
Database Records
- $stripTeaser : bool = false
-
Strip the Teaser text when true
Return values
stringgetPage()
Set the backend page
public
getPage() : mixed
Tags
GetProfileURL()
Return link to the profile of a user
public
GetProfileURL(mixed $code, mixed $email[, mixed $type = self::USER_TYPE_NEWSLETTER ][, mixed $htmlTag = true ]) : mixed
Parameters
- $code : mixed
- $email : mixed
- $type : mixed = self::USER_TYPE_NEWSLETTER
- $htmlTag : mixed = true
getRecipientLocaleIdByRecipientId()
Returns the Language ID for a newsletter recipient
public
getRecipientLocaleIdByRecipientId(int $id, string $type) : int
If the recipients's preferred language can not be found, the default language ID is returned.
Parameters
- $id : int
-
id of the recipient or the linked access/crm user
- $type : string
-
User type (see constants)
Return values
int —Language ID
getSettings()
This is a workaround for PHP 7 compatability.
public
static getSettings() : mixed
As the method _getSettings was used in mixed scope.
Tags
GetTemplateSource()
public
GetTemplateSource(mixed $TemplateID) : mixed
Parameters
- $TemplateID : mixed
GetUnsubscribeURL()
Get the URL to the page to unsubscribe
public
GetUnsubscribeURL(mixed $code, mixed $email[, mixed $type = self::USER_TYPE_NEWSLETTER ][, mixed $htmlTag = true ]) : mixed
Parameters
- $code : mixed
- $email : mixed
- $type : mixed = self::USER_TYPE_NEWSLETTER
- $htmlTag : mixed = true
getUsersPreferredLanguageId()
Returns the Language ID for a newsletter user
public
getUsersPreferredLanguageId(string $email, string $type) : int
If the user's preferred language can not be found, the default language ID is returned. For crm email addresses this will be the system default language by now
Parameters
- $email : string
-
E-mail address of the user
- $type : string
-
User type (see constants)
Return values
int —Language ID
importuser()
public
importuser() : mixed
interfaceSettings()
public
interfaceSettings() : mixed
JSadduser()
public
JSadduser() : mixed
JSedituser()
public
JSedituser() : mixed
NewsletterNotSendCount()
public
NewsletterNotSendCount() : mixed
NewsletterSendCount()
public
NewsletterSendCount() : mixed
parseConsentView()
Parses the consent icons
public
static parseConsentView(string $source, string $consent) : string
Parameters
- $source : string
-
Either "backend", "api", "opt-in", "undefined"
- $consent : string
-
Date parseable by DateTime or empty string
Return values
string —HTML content
parseNewsDetails()
Parse the news details blocks
public
parseNewsDetails(Sigma $objNewsTpl, NewsLibrary $objNewsLib, object $objNews, int &$currentCategory) : null
Parameters
- $objNewsTpl : Sigma
-
Template object
- $objNewsLib : NewsLibrary
-
News library object
- $objNews : object
-
Database Records
- $currentCategory : int
-
Current category id
Return values
nullParseNewsletter()
Parse the newsletter
public
ParseNewsletter(mixed $subject, mixed $content_text, mixed $TemplateSource, mixed $format, mixed $TargetEmail, mixed $userData, mixed $NewsletterID[, mixed $testDelivery = false ]) : mixed
Parameters
- $subject : mixed
- $content_text : mixed
- $TemplateSource : mixed
- $format : mixed
- $TargetEmail : mixed
- $userData : mixed
- $NewsletterID : mixed
- $testDelivery : mixed = false
Tags
SelectListCategory()
public
SelectListCategory() : mixed
SelectListFields()
public
SelectListFields() : mixed
SelectListStatus()
public
SelectListStatus() : mixed
sendConsentConfirmationMail()
Send a consent confirmation mail to users based on mailing list
public
sendConsentConfirmationMail(array<string|int, mixed> $categoryIds[, string $email = '' ]) : bool
Parameters
- $categoryIds : array<string|int, mixed>
-
Category to send mail for
- $email : string = ''
-
(optional) Only sends the mail to this user
Return values
bool —False if something went wrong, true otherwise
showSettings()
Parse the newsletter settings section
public
showSettings() : mixed
UserCount()
public
UserCount() : mixed
valueFromDate()
Takes a mktime()-timestamp and formats it as dd.mm.yyyy hh:mm
public
valueFromDate([ $value = 0 ][, mixed $format = 'd.m.Y H:i:s' ]) : string
Parameters
Return values
string_getGroups()
Return the access user groups
protected
_getGroups([string $orderBy = "`group_name`" ]) : array<string|int, mixed>
Parameters
- $orderBy : string = "`group_name`"
Tags
Return values
array<string|int, mixed>emailEditGetCrmMembershipFilter()
Return the Crm membership filter of an email
protected
emailEditGetCrmMembershipFilter(int $mail) : array<string|int, mixed>
Parameters
- $mail : int
Return values
array<string|int, mixed>escapeCsvValue()
Escape a value that it could be inserted into a csv file.
protected
escapeCsvValue(string $value) : string
Parameters
- $value : string
Return values
stringgetAttributeOfTag()
Returns the value of an attribute of the specified HTML tag name
protected
getAttributeOfTag(string $html, string $tagName, string $attributeName) : string
Parameters
- $html : string
-
HTML to perform search in
- $tagName : string
-
HTML tag to look for
- $attributeName : string
-
HTML attribute to look for
Return values
string —Attribute value or empty string if not set
getCountryMenu()
protected
getCountryMenu([mixed $selectedCountry = 0 ][, mixed $mantatory = false ]) : mixed
Parameters
- $selectedCountry : mixed = 0
- $mantatory : mixed = false
getCrmMembershipConditions()
Returns the where condition for the filtered crm newsletter recipients
protected
getCrmMembershipConditions(array<string|int, mixed> $crmMembershipFilter[, bool $allowOtherNewsletterType = false ]) : string
Parameters
- $crmMembershipFilter : array<string|int, mixed>
-
the filters for the given mail
- $allowOtherNewsletterType : bool = false
-
check if the e-mail address is an crm address
Return values
string —the WHERE statement of the sql query
getCssAttributeOfTag()
Returns the value of an attribute of the style attribute of an HTML tag
protected
getCssAttributeOfTag(string $html, string $tagName, string $cssAttributeName) : string
Parameters
- $html : string
-
HTML to perform search in
- $tagName : string
-
HTML tag to look for
- $cssAttributeName : string
-
CSS attribute to look for in style attribute
Return values
string —Attribute value or empty string if not set
getListRecipientCount()
Return the count of recipients of a list
protected
static getListRecipientCount(int $id) : int
Parameters
- $id : int
Tags
Return values
intgetMailRecipientQuery()
Return the recipient SQL query for a specific e-mail campaign
protected
getMailRecipientQuery(int $mailId[, mixed $distinctByType = true ]) : string
Parameters
- $mailId : int
-
The ID of the e-mail campaign to return the SQL query to fetch the recipients from
- $distinctByType : mixed = true
Tags
Return values
string —SQL query to fetch the recipients of the specified e-mail campaign
getNewsletterData()
Return some newsletter data
protected
getNewsletterData(int $id) : array<string|int, mixed>
Parameters
- $id : int
Tags
Return values
array<string|int, mixed> —array(subject, status, count, tmp_copy)
getRecipientListAssociation()
Get the list associations for all recipients.
protected
getRecipientListAssociation() : array<string|int, mixed>
This method does return all recipients and their list associations as they are found in the database. This means that also inactive and non-confirmed recipients are returned. Further it will return all list associations, irrespective of the recipients consent state.
Return values
array<string|int, mixed> —The returned array will have the following structure:
[
'newsletter_user' => [
<recipient_id> => [
<list_id>,
...
],
...
],
'access_user' => [
<recipient_id> => [
<list_id>,
...
],
...
]
]
Note that the recipients are grouped by source type. newsletter_user
refers
to recipients managed directly by the Newsletter component. access_users
are recipients managed by the Access component.
getSetting()
Return a setting from the settings table
protected
getSetting(string $name) : string
Parameters
- $name : string
Tags
Return values
string —| bool
getTmpSending()
Get the emails from the tmp sending page
protected
getTmpSending(mixed $id, mixed $amount) : DBIterator
Parameters
- $id : mixed
- $amount : mixed
Tags
Return values
DBIteratorgetUserDateTime()
Get a user dateTime in H:i:s d.m.Y format from db data
protected
static getUserDateTime(string $userDateTime) : string
Parameters
- $userDateTime : string
-
DateTime from a db
Return values
string —Return a formatted dateTime as string
getUserEditLink()
Return the Edit link of the inform email
protected
getUserEditLink(int $userID, const $type) : mixed
Parameters
- $userID : int
- $type : const
Tags
informAdminAboutRejectedMail()
Inform the admin about a reject
protected
informAdminAboutRejectedMail(int $newsletterID, int $userID, string $email, string $type, array<string|int, mixed> $newsletterUserData) : mixed
If an email could not be sent, inform the administrator about that (only if the option to do so was set)
Parameters
- $newsletterID : int
-
Nesletter id
- $userID : int
-
User Id
- $email : string
-
E-mail id of the user
- $type : string
-
User type
- $newsletterUserData : array<string|int, mixed>
-
Info about the newsletter user
prepareForRegExp()
protected
static prepareForRegExp(mixed $Text) : mixed
Parameters
- $Text : mixed
prepareNewsletterLinksForSend()
protected
static prepareNewsletterLinksForSend(mixed $MailId, mixed $MailHtmlContent, mixed $UserId, mixed $recipientType[, mixed $langId = null ]) : mixed
Parameters
- $MailId : mixed
- $MailHtmlContent : mixed
- $UserId : mixed
- $recipientType : mixed
- $langId : mixed = null
SendEmail()
Deliver an email campaign to a recipient
protected
SendEmail(int $UserID, int $NewsletterID, string $TargetEmail, bool $TmpEntry[, string $type = self::USER_TYPE_NEWSLETTER ][, bool $sealDelivery = true ]) : mixed
Parameters
- $UserID : int
-
ID of the recipient to receive the email campaign.
- $NewsletterID : int
-
ID of the email campaign to deliver
- $TargetEmail : string
-
Email of the recipient to receive the email campaign.
- $TmpEntry : bool
-
If set to TRUE, then the send operation will execute a live delivery to the recipient. Otherwise if set to FALSE, then the send operation performs a test delivery to the recipient.
- $type : string = self::USER_TYPE_NEWSLETTER
-
Type of the recipient to receive the email campaign. One of the following:
- NewsletterManager::USER_TYPE_NEWSLETTER (default)
- NewsletterManager::USER_TYPE_ACCESS
- NewsletterManager::USER_TYPE_CORE
- $sealDelivery : bool = true
-
If set to TRUE, the email campaign will be marked as sent in the case the campaign has been delivered (or attempted to) to all recipients. If set to FALSE, the delivery check will be skipped and the campaign will not be marked as sent (in case it hasn't been so anyway already). Defaults to TRUE.
setAttributeOfTag()
Sets the HTML attribute of a tag to a specified value
protected
setAttributeOfTag(string $html, string $tagName, string $attributeName, string $attributeValue) : string
Parameters
- $html : string
-
HTML to perform search in
- $tagName : string
-
HTML tag to look for
- $attributeName : string
-
HTML attribute to look for
- $attributeValue : string
-
Value to set
Return values
string —altered HTML
setCrmMembershipFilter()
Store the CRM membership filter
protected
setCrmMembershipFilter(int $mailID, array<string|int, mixed> $membershipFilter, string $type, string $mailSentDate) : bool
Parameters
- $mailID : int
- $membershipFilter : array<string|int, mixed>
- $type : string
- $mailSentDate : string
-
sent date
Tags
Return values
bool —true if modification was made, else otherwise
_getMailRecipientCount()
private
_getMailRecipientCount([mixed $mailId = null ][, mixed $limit = 0 ][, mixed $pos = 0 ]) : mixed
Parameters
- $mailId : mixed = null
- $limit : mixed = 0
- $pos : mixed = 0
emailEditGetAssociatedGroups()
Return the associated access groups of an email
private
emailEditGetAssociatedGroups(int $mail) : array<string|int, mixed>
Parameters
- $mail : int
Tags
Return values
array<string|int, mixed>emailEditParseGroups()
Parse the groups into the mail edit page
private
emailEditParseGroups([mixed $associatedGroups = array() ]) : mixed
Parameters
- $associatedGroups : mixed = array()
Tags
getAllRecipientEmails()
Return all email recipients
private
getAllRecipientEmails(int $mailID) : object
Parameters
- $mailID : int
Tags
Return values
objectgetCurrentMailRecipientCount()
Return the recipient count of the emails
private
getCurrentMailRecipientCount(int $mailId) : int
Parameters
- $mailId : int
Tags
Return values
intgetFinalMailRecipientCount()
private
getFinalMailRecipientCount([mixed $mailId = null ]) : mixed
Parameters
- $mailId : mixed = null
Tags
getLinkData()
private
getLinkData(mixed $linkId) : mixed
Parameters
- $linkId : mixed
getNewsletterUserData()
Return the user data
private
getNewsletterUserData(int $id, string $type) : adodb
Parameters
- $id : int
- $type : string
Tags
Return values
adodb —result object
getNewsletterValues()
Return the newsletter values
private
getNewsletterValues(int $id) : array<string|int, mixed>
Parameters
- $id : int
Return values
array<string|int, mixed> —| bool
getTmpRecipientCount()
Return the recipient count of a newsletter in the temp table
private
getTmpRecipientCount(int $id) : int
Parameters
- $id : int
Tags
Return values
intinsertTmpEmail()
Insert an email address into the email table
private
insertTmpEmail(int $mail, string $email, mixed $type) : mixed
Parameters
- $mail : int
- $email : string
- $type : mixed
Tags
returnNewsletterUser()
Return all newsletter users and those access users who are assigned to the list and their information
private
returnNewsletterUser(string $where[, mixed $order = '' ][, int $newsletterListId = 0 ][, mixed $status = null ][, mixed $limit = null ][, mixed $pagingPos = 0 ]) : array<string|int, mixed>
Parameters
- $where : string
-
The where String for searching
- $order : mixed = ''
- $newsletterListId : int = 0
-
The id of the newsletter category to be selected (0 for all users)
- $status : mixed = null
- $limit : mixed = null
- $pagingPos : mixed = 0
Tags
Return values
array<string|int, mixed> —array(array, int)
setMailGroups()
Associate the user groups with the mail
private
setMailGroups(int $mailID, array<string|int, mixed> $groups, string $mailSentDate) : mixed
Associate the access user groups with the newsletter email.
Parameters
- $mailID : int
- $groups : array<string|int, mixed>
- $mailSentDate : string
-
sent date
Tags
updateNewsletterRecipientCount()
Update the recipient count of a newsletter
private
updateNewsletterRecipientCount(int $newsletter) : mixed
Parameters
- $newsletter : int