View Issue Details

IDProjectCategoryView StatusLast Update
0019148phpList 3 applicationInterface - Administratorpublic09-05-18 13:55
ReportersamtukeAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSFedoraOS Version26
Product Version3.3.1 
Target Version3.3.3Fixed in Version3.3.3 
Summary0019148: Add documentation on subscriber data placeholders in contextual help
DescriptionEdit: Issue summary was updated from: 'Add more placeholders available by default with basic subscriber info'. Reason for update is that this data is already available, just not documented.

The following data is available for all subscribers but not accessible via campaign placeholders:

- Entered
- Last modified
- Number of bounces

Make this data available by default on a new phpList 3 installation via placeholders in campaigns. Preferably use descriptive placeholder names such as:


The dates in particular are useful for re-confirmation campaigns, e.g. "Remember us? You signed up to receive newsletters on [SIGNUP DATE]", which are common practice on other platforms.
TagsNo tags attached.


related to 0019124 resolvedxheni phpList 3 application Change default confirmation email text to include how data will be used 
related to 0019187 resolvedxheni phpList 3 application Add draft campaign for use with invite plugin available in new installations 



28-03-18 17:37

manager   ~0060194

@michiel How are new default attributes added? Please assign this to Xheni after providing guidance.


28-03-18 19:01

administrator   ~0060195

I don't understand that question in this context. I thought you meant these default attributes

Those are added here, as plain text files:


28-03-18 19:21

administrator   ~0060196

I think we should avoid using spaces in placeholders. I don't think any of the existing ones have spaces. This can caused issues with regex and line wrapping, eg


won't match, but people will think it does.

So, in general no spaces or other characters (not underscores either, they are even more confusing, as often they look like spaces, but aren't). Also dashes cause loads of trouble.

I would also argue for short tags, which can be explained in the docs




29-03-18 12:39

manager   ~0060210

@michiel My question would have more accurately been "How are new default placeholders added?". The confusion came from placeholders stemming from attributes, and the data in question (e.g. subscription date) is stored in the system but not strictly speaking an attribute and therefore not available as a placeholder.

To rephrase: what approach would you use to make data such as subscriber creation date available as a placeholder by default in campaign content?


29-03-18 17:42

administrator   ~0060220

"userdata" is populated here:

and the placeholders replaced here:

So, even though the docs probably do not mention them, all "user" fields should work as placeholders.

Try sending a campaign with

[UUID] or [BOUNCECOUNT] and it will be populated.

You can even use the Fallback:

[BOUNCECOUNT%%no emails bounced to your address]


29-03-18 18:34

administrator   ~0060221

is that enough? Basically, if you want to add placeholders, add entries to the "html", "text" or userdata associative arrays, which are automatically used for parsing. Be aware though that this section is called for every subscriber, so it needs to be fast.


30-03-18 14:16

manager   ~0060233

Last edited: 04-04-18 16:01

View 2 revisions

@michiel yes the data I was referring to is already available, just not documented in the contextual help popup which lists the others. Having tested all available phplist_user_user table columns, this is what is currently accessible via placeholders, including real data/format:

ID = 6
ENTERED = 2017-04-07 10:34:22
MODIFIED = 2017-04-07 10:37:02
UNIQID = 42c7d9e466e98a1562722dc36574241d
UUID = 096339c1-8151-406f-995f-7a9c3856821d

It would be better if the dates were available in a more friendly format; that could either be achieved as you decribe (adding the formatted versions to the array), or (involving more work) adding support for more templating functions within placeholders (e.g. [DATE%f) for formatting dates).


30-03-18 14:28

manager   ~0060234

@michiel In order to add these placeholders to the help text for the campaign composer page, the same query that is used in sendmaillib.php could be executed in the help script (message.php), and then inserted into the array which is used to list the placeholders. That query:

$query = sprintf('select * from %s where email = "%s"', $GLOBALS['tables']['user'], sql_escape($email));

Do you foresee any problems with this approach?


02-04-18 09:28

administrator   ~0060246

For security reasons, we should exclude at least "password", "uuid", "id" and "uniqid"

in fact, we should remove those when building campaigns.


04-04-18 16:02

manager   ~0060290

@michiel password is already not included, but "uuid", "id" and "uniqid" are. I suppose they could be useful in campaigns -- what is the security risk there?


04-04-18 16:04

manager   ~0060291

[DOMAIN] and [WEBSITE] have been tested and I confirm that they already work by default.

The total list of placeholders missing from the contextual help popup on the campaign composer page is currently:



06-04-18 19:20

administrator   ~0060316

Yes, except that for security I would not include UUID and ID.

UNIQID is ok to include as it is sent in every email anyway.

 "disabled" and "optedin" are also fairly sensitive and mostly for internal use, not to be shared with the subscriber.


09-04-18 11:35

manager   ~0060337

Here is the list of placeholders to be added to the contextual help on the campaign composer page then (sensitive items have been removed):


The help file which handles this text is in the following repo in en/message.php:


24-04-18 20:10

developer   ~0060472