ProMailerSubscribers::importCSV()

Import subscribers from given CSV file

First line must contain header line with one of them being "email". Columns other than "email" are placed in the "data" array of each subscriber. Imported subscribers are considered "confirmed". To import subscriber removals, prepend email address with a minus, i.e. "-you

Usage

// basic usage
$array = $proMailerSubscribers->importCSV(string $csvFile, $list);

// usage with all arguments
$array = $proMailerSubscribers->importCSV(string $csvFile, $list, array $options = []);

Arguments

NameType(s)Description
$csvFilestring
$listint ProMailerList
$options (optional)array
  • `delimiter' (string): Delimiter for CSV fields, ",", ";", "\t", or "a" for auto-detect Default:','
  • length (int): Maximum line length/chunk size Default:4096

Return value

array bool

Returns false on fail or on success returns array with counts of 'added', 'failed', 'skipped', 'removed'


ProMailerSubscribers methods and properties

API reference based on ProcessWire core version 3.0.253