ProMailerSubscribers class

Located in file /site/modules/ProMailer/ProMailerSubscribers.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ProMailerSubscribers class also inherits all the methods and properties of: ProMailerTypeManager and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
ProMailerSubscribers::add(string $email, $list)
ProMailerSubscriber bool intAdd a subscriber to a subscribers list 
ProMailerSubscribers::addReady(string $email, ProMailerList $list, bool $confirmed, array $data)
boolReady to add new subscriber
ProMailerSubscribers::added(ProMailerSubscriber $subscriber)
(nothing)New subscriber added
ProMailerSubscribers::bounce($subscriber)
intRecord a bounce for an email address or a subscriber in a list 
ProMailerSubscribers::bounceEmail($email)
int
ProMailerSubscribers::bouncePage(Page $page, ProMailerList $list)
int
ProMailerSubscribers::bounceSubscriber(ProMailerSubscriber $subscriber, ProMailerList $list)
int
ProMailerSubscribers::confirmEmail(string $email, $list, string $code)
boolConfirm a subscriber as opt-in for a list 
ProMailerSubscribers::confirmEmailReady(string $email, ProMailerList $list, string $code)
boolReady to confirm an email
ProMailerSubscribers::confirmUrl(ProMailerSubscriber $subscriber, ProMailerList $list, Page $page)
string
ProMailerSubscribers::confirmedEmail(string $email, ProMailerList $list, string $code)
(nothing)Email confirmed
ProMailerSubscribers::copyAll(ProMailerList $list1, ProMailerList $list2)
arrayCopy all subscribers from list1 into list2 
ProMailerSubscribers::count()
intReturn total count of subscribers for given list 
ProMailerSubscribers::exportCSV($listId)
(nothing)Export subscribers to CSV download 
ProMailerSubscribers::find()
ProMailerSubscribersArray intGet current pagination (limit=100) of subscribers for given list 
ProMailerSubscribers::get($id)
ProMailerSubscriber boolGet a subscriber by email or ID 
ProMailerSubscribers::getAllowedSorts()
arrayGet fields allowed for sorting of subscribers 
ProMailerSubscribers::getByEmail(string $email)
bool array ProMailerSubscriberGiven an email address return the subscriber or boolean false if not found 
ProMailerSubscribers::getById(int $id)
bool ProMailerSubscriberGet a subscriber by ID 
ProMailerSubscribers::getCode($subscriber)
stringGet the confirmation code for given subscriber array or Page 
ProMailerSubscribers::getConfirmUrl(ProMailerSubscriber $subscriber)
stringGet the URL needed to confirm a subscriber 
ProMailerSubscribers::getDefaultSort()
stringGet default sort for subscribers 
ProMailerSubscribers::getNext($list)
ProMailerSubscriber bool nullGet the next subscriber for the given list 
ProMailerSubscribers::getPageCode(Page $page)
string
ProMailerSubscribers::getPageEmailField($list)
stringGet name of field used for email address on subscriber pages 
ProMailerSubscribers::getPageTemplates($list)
arrayGet array of template names used by subscriber pages 
ProMailerSubscribers::getRandomCode()
string
ProMailerSubscribers::getSubscriberCode(ProMailerSubscriber $subscriber)
string
ProMailerSubscribers::getUnsubscribeUrl($subscriber)
stringGet the URL to unsubscribe a particular subscriber from their list 
ProMailerSubscribers::importCSV(string $csvFile, $list)
array boolImport subscribers from given CSV file 
ProMailerSubscribers::install()
(nothing) 
ProMailerSubscribers::pageSelector($list)
string arrayReturn selector for finding subscribers from given list 
ProMailerSubscribers::pageToSubscriber(Page $page, $list)
ProMailerSubscriberConvert Page to a subscriber array 
ProMailerSubscribers::removeUnconfirmed()
intRemove subscribers that haven’t been confirmed for given number of days 
ProMailerSubscribers::save(ProMailerSubscriber $subscriber)
boolSave/update the given subscriber 
ProMailerSubscribers::saveLog(string $str)
(nothing)Save entry to subscribers log 
ProMailerSubscribers::saveLogDisabled()
boolDisable or enable logging or return current state if given no argumenets 
ProMailerSubscribers::saveReady(ProMailerSubscriber $subscriber, array $properties)
boolSubscriber ready to save
ProMailerSubscribers::saved(ProMailerSubscriber $subscriber, array $properties)
(nothing)Subscriber saved
ProMailerSubscribers::table()
stringGet the DB table name used by this type 
ProMailerSubscribers::unsubscribe($subscriber, $list)
boolRemove a subscriber from a list 
ProMailerSubscribers::unsubscribeAllFromList(ProMailerList $list)
intRemove all subscribers from a list
ProMailerSubscribers::unsubscribed(ProMailerSubscriber $subscriber, ProMailerList $list)
(nothing)Subscriber removed from list
ProMailerSubscribers::unsubscribedEmail(string $email)
(nothing)Email address removed from ALL lists
ProMailerSubscribers::unsubscribedPage(Page $subscriber, ProMailerList $list)
(nothing)Page-based subscriber unsubscribed from pages-type list
ProMailerSubscribers::upgrade($fromVersion, $toVersion)
(nothing) 

Additional methods and properties

In addition to the methods and properties above, ProMailerSubscribers also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer